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