1 ; RUN: llc < %s -O0 -march=nvptx64 -mcpu=sm_20 | FileCheck %s
2 ; RUN: %if ptxas %{ llc < %s -O0 -march=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
4 ; CHECK-LABEL: .visible .func callee(
5 ; CHECK-NEXT: .param .align 16 .b8 callee_param_0[16],
6 ; CHECK-NEXT: .param .align 16 .b8 callee_param_1[16],
7 define void @callee(i128, i128, ptr) {
8 ; CHECK-DAG: ld.param.v2.u64 {%[[REG0:rd[0-9]+]], %[[REG1:rd[0-9]+]]}, [callee_param_0];
9 ; CHECK-DAG: ld.param.v2.u64 {%[[REG2:rd[0-9]+]], %[[REG3:rd[0-9]+]]}, [callee_param_1];
11 ; CHECK: mul.lo.s64 %[[REG4:rd[0-9]+]], %[[REG0]], %[[REG3]];
12 ; CHECK-NEXT: mul.hi.u64 %[[REG5:rd[0-9]+]], %[[REG0]], %[[REG2]];
13 ; CHECK-NEXT: add.s64 %[[REG6:rd[0-9]+]], %[[REG5]], %[[REG4]];
14 ; CHECK-NEXT: mul.lo.s64 %[[REG7:rd[0-9]+]], %[[REG1]], %[[REG2]];
15 ; CHECK-NEXT: add.s64 %[[REG8:rd[0-9]+]], %[[REG6]], %[[REG7]];
16 ; CHECK-NEXT: mul.lo.s64 %[[REG9:rd[0-9]+]], %[[REG0]], %[[REG2]];
23 ; CHECK-LABEL: .visible .entry caller_kernel(
24 ; CHECK-NEXT: .param .align 16 .b8 caller_kernel_param_0[16],
25 ; CHECK-NEXT: .param .align 16 .b8 caller_kernel_param_1[16],
26 define ptx_kernel void @caller_kernel(i128, i128, ptr) {
28 ; CHECK-DAG: ld.param.v2.u64 {%[[REG0:rd[0-9]+]], %[[REG1:rd[0-9]+]]}, [caller_kernel_param_0];
29 ; CHECK-DAG: ld.param.v2.u64 {%[[REG2:rd[0-9]+]], %[[REG3:rd[0-9]+]]}, [caller_kernel_param_1];
31 ; CHECK: { // callseq [[CALLSEQ_ID:[0-9]]], 0
32 ; CHECK: .param .align 16 .b8 param0[16];
33 ; CHECK-NEXT: st.param.v2.b64 [param0+0], {%[[REG0]], %[[REG1]]}
34 ; CHECK: .param .align 16 .b8 param1[16];
35 ; CHECK-NEXT: st.param.v2.b64 [param1+0], {%[[REG2]], %[[REG3]]}
36 ; CHECK: } // callseq [[CALLSEQ_ID]]
37 call void @callee(i128 %0, i128 %1, ptr %2)
42 ; CHECK-LABEL: .visible .func caller_func(
43 ; CHECK-NEXT: .param .align 16 .b8 caller_func_param_0[16],
44 ; CHECK-NEXT: .param .align 16 .b8 caller_func_param_1[16],
45 define void @caller_func(i128, i128, ptr) {
47 ; CHECK-DAG: ld.param.v2.u64 {%[[REG0:rd[0-9]+]], %[[REG1:rd[0-9]+]]}, [caller_func_param_0]
48 ; CHECK-DAG: ld.param.v2.u64 {%[[REG2:rd[0-9]+]], %[[REG3:rd[0-9]+]]}, [caller_func_param_1]
50 ; CHECK: { // callseq [[CALLSEQ_ID:[0-9]]], 0
51 ; CHECK: .param .align 16 .b8 param0[16];
52 ; CHECK: st.param.v2.b64 [param0+0], {%[[REG0]], %[[REG1]]}
53 ; CHECK: .param .align 16 .b8 param1[16];
54 ; CHECK: st.param.v2.b64 [param1+0], {%[[REG2]], %[[REG3]]}
55 ; CHECK: } // callseq [[CALLSEQ_ID]]
56 call void @callee(i128 %0, i128 %1, ptr %2)