xref: /aosp_15_r20/external/llvm/test/CodeGen/AMDGPU/calling-conventions.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=amdgcn -mcpu=SI -verify-machineinstrs | FileCheck --check-prefix=SI %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Make sure we don't crash or assert on spir_kernel calling convention.
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker; SI-LABEL: {{^}}kernel:
6*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm
7*9880d681SAndroid Build Coastguard Workerdefine spir_kernel void @kernel(i32 addrspace(1)* %out) {
8*9880d681SAndroid Build Coastguard Workerentry:
9*9880d681SAndroid Build Coastguard Worker  store i32 0, i32 addrspace(1)* %out
10*9880d681SAndroid Build Coastguard Worker  ret void
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; FIXME: This is treated like a kernel
14*9880d681SAndroid Build Coastguard Worker; SI-LABEL: {{^}}func:
15*9880d681SAndroid Build Coastguard Worker; SI: s_endpgm
16*9880d681SAndroid Build Coastguard Workerdefine spir_func void @func(i32 addrspace(1)* %out) {
17*9880d681SAndroid Build Coastguard Workerentry:
18*9880d681SAndroid Build Coastguard Worker  store i32 0, i32 addrspace(1)* %out
19*9880d681SAndroid Build Coastguard Worker  ret void
20*9880d681SAndroid Build Coastguard Worker}
21