xref: /aosp_15_r20/external/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=+promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker; RUN: not llc -march=r600 -mcpu=cypress < %s 2>&1 | FileCheck %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker; CHECK: in function test_dynamic_stackalloc{{.*}}: unsupported dynamic alloca
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine void @test_dynamic_stackalloc(i32 addrspace(1)* %out, i32 %n) {
8*9880d681SAndroid Build Coastguard Worker  %alloca = alloca i32, i32 %n
9*9880d681SAndroid Build Coastguard Worker  store volatile i32 0, i32* %alloca
10*9880d681SAndroid Build Coastguard Worker  ret void
11*9880d681SAndroid Build Coastguard Worker}
12