xref: /aosp_15_r20/external/llvm/test/CodeGen/NVPTX/i8-param.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker; CHECK: .visible .func  (.param .b32 func_retval0) callee
6*9880d681SAndroid Build Coastguard Workerdefine i8 @callee(i8 %a) {
7*9880d681SAndroid Build Coastguard Worker; CHECK: ld.param.u8
8*9880d681SAndroid Build Coastguard Worker  %ret = add i8 %a, 42
9*9880d681SAndroid Build Coastguard Worker; CHECK: st.param.b32
10*9880d681SAndroid Build Coastguard Worker  ret i8 %ret
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; CHECK: .visible .func caller
14*9880d681SAndroid Build Coastguard Workerdefine void @caller(i8* %a) {
15*9880d681SAndroid Build Coastguard Worker; CHECK: ld.u8
16*9880d681SAndroid Build Coastguard Worker  %val = load i8, i8* %a
17*9880d681SAndroid Build Coastguard Worker  %ret = tail call i8 @callee(i8 %val)
18*9880d681SAndroid Build Coastguard Worker; CHECK: ld.param.b32
19*9880d681SAndroid Build Coastguard Worker  store i8 %ret, i8* %a
20*9880d681SAndroid Build Coastguard Worker  ret void
21*9880d681SAndroid Build Coastguard Worker}
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Worker
24