xref: /llvm-project/llvm/test/Verifier/NVPTX/setmaxnreg.ll (revision 340cc1702e21128b62799c5dfbf2875c3c2c96a1)
1; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
2
3declare void @llvm.nvvm.setmaxnreg.inc.sync.aligned.u32(i32 %reg_count)
4declare void @llvm.nvvm.setmaxnreg.dec.sync.aligned.u32(i32 %reg_count)
5
6define void @test_set_maxn_reg() {
7  ; CHECK: reg_count argument to nvvm.setmaxnreg must be in multiples of 8
8  call void @llvm.nvvm.setmaxnreg.inc.sync.aligned.u32(i32 95)
9
10  ; CHECK: reg_count argument to nvvm.setmaxnreg must be within [24, 256]
11  call void @llvm.nvvm.setmaxnreg.dec.sync.aligned.u32(i32 16)
12
13  ret void
14}
15