blob: 45a399b058ccea9115be1e6e85c7734cfe232512 [file] [log] [blame]
Matt Arsenault9ba465a2017-11-14 20:33:14 +00001; RUN: not llc -march=amdgcn < %s 2>&1 | FileCheck -check-prefix=ERROR %s
2; RUN: not llc -march=amdgcn < %s | FileCheck -check-prefix=GCN %s
3
4declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) #1
5
6; ERROR: error: stack size limit exceeded (4294967296) in stack_size_limit
7; GCN: ; ScratchSize: 4294967296
8define amdgpu_kernel void @stack_size_limit() #0 {
9entry:
10 %alloca = alloca [1073741823 x i32], align 4
11 %bc = bitcast [1073741823 x i32]* %alloca to i8*
12 call void @llvm.memset.p0i8.i32(i8* %bc, i8 9, i32 1073741823, i32 1, i1 true)
13 ret void
14}