Home | History | Annotate | Download | only in PTX
      1 ; RUN: llc < %s -march=ptx32 -mattr=sm20 | FileCheck %s
      2 ; XFAIL: *
      3 
      4 %complex = type { float, float }
      5 
      6 define ptx_device %complex @complex_add(%complex %a, %complex %b) {
      7 entry:
      8 ; CHECK:      ld.param.f32	r[[R0:[0-9]+]], [__param_1];
      9 ; CHECK-NEXT:	ld.param.f32	r[[R2:[0-9]+]], [__param_3];
     10 ; CHECK-NEXT:	ld.param.f32	r[[R1:[0-9]+]], [__param_2];
     11 ; CHECK-NEXT:	ld.param.f32	r[[R3:[0-9]+]], [__param_4];
     12 ; CHECK-NEXT:	add.rn.f32	r[[R0]], r[[R0]], r[[R2]];
     13 ; CHECK-NEXT:	add.rn.f32	r[[R1]], r[[R1]], r[[R3]];
     14 ; CHECK-NEXT:	ret;
     15   %a.real = extractvalue %complex %a, 0
     16   %a.imag = extractvalue %complex %a, 1
     17   %b.real = extractvalue %complex %b, 0
     18   %b.imag = extractvalue %complex %b, 1
     19   %ret.real = fadd float %a.real, %b.real
     20   %ret.imag = fadd float %a.imag, %b.imag
     21   %ret.0 = insertvalue %complex undef, float %ret.real, 0
     22   %ret.1 = insertvalue %complex %ret.0, float %ret.imag, 1
     23   ret %complex %ret.1
     24 }
     25