xref: /llvm-project/llvm/test/CodeGen/NVPTX/anonymous-fn-param.ll (revision b279f6b098d3849f7f1c1f539b108307d5f8ae2d)
1; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_20 | FileCheck %s
2; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
3
4; Check that parameter names we generate in the function signature and the name
5; we use when we refer to the parameter in the function body do match.
6
7; CHECK:      .func (.param .b32 func_retval0) __unnamed_1(
8; CHECK-NEXT: .param .b32 __unnamed_1_param_0
9; CHECK:      ld.param.u32 {{%r[0-9]+}}, [__unnamed_1_param_0];
10
11define internal i32 @0(i32 %a) {
12entry:
13  %r = add i32 %a, 1
14  ret i32 %r
15}
16
17; CHECK:      .func (.param .b32 func_retval0) __unnamed_2(
18; CHECK-NEXT: .param .b32 __unnamed_2_param_0
19; CHECK:      ld.param.u32 {{%r[0-9]+}}, [__unnamed_2_param_0];
20
21define internal i32 @1(i32 %a) {
22entry:
23  %r = add i32 %a, 1
24  ret i32 %r
25}
26