annotate llvm/test/CodeGen/AMDGPU/spill-alloc-sgpr-init-bug.ll @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1f2b6ac9f198
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck --check-prefix=TONGA %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 ; On Tonga and Iceland, limited SGPR availability means care must be taken to
anatofuz
parents:
diff changeset
4 ; allocate scratch registers correctly. Check that this test compiles without
anatofuz
parents:
diff changeset
5 ; error.
anatofuz
parents:
diff changeset
6 ; TONGA-LABEL: test
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
7 define amdgpu_kernel void @test(ptr addrspace(1) %out, ptr addrspace(1) %in) {
150
anatofuz
parents:
diff changeset
8 entry:
anatofuz
parents:
diff changeset
9 %mbcnt.lo = call i32 @llvm.amdgcn.mbcnt.lo(i32 -1, i32 0)
anatofuz
parents:
diff changeset
10 %tid = call i32 @llvm.amdgcn.mbcnt.hi(i32 -1, i32 %mbcnt.lo)
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
11 %aptr = getelementptr <256 x i32>, ptr addrspace(1) %in, i32 %tid
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
12 %a = load <256 x i32>, ptr addrspace(1) %aptr
150
anatofuz
parents:
diff changeset
13 call void asm sideeffect "", "~{memory}" ()
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
14 %outptr = getelementptr <256 x i32>, ptr addrspace(1) %in, i32 %tid
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
15 store <256 x i32> %a, ptr addrspace(1) %outptr
150
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 ; mark 128-bit SGPR registers as used so they are unavailable for the
anatofuz
parents:
diff changeset
18 ; scratch resource descriptor
anatofuz
parents:
diff changeset
19 call void asm sideeffect "", "~{s4},~{s8},~{s12},~{s16},~{s20},~{s24},~{s28}" ()
anatofuz
parents:
diff changeset
20 call void asm sideeffect "", "~{s32},~{s36},~{s40},~{s44},~{s48},~{s52},~{s56}" ()
anatofuz
parents:
diff changeset
21 call void asm sideeffect "", "~{s60},~{s64},~{s68}" ()
anatofuz
parents:
diff changeset
22 ret void
anatofuz
parents:
diff changeset
23 }
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 declare i32 @llvm.amdgcn.mbcnt.lo(i32, i32) #0
anatofuz
parents:
diff changeset
26 declare i32 @llvm.amdgcn.mbcnt.hi(i32, i32) #0
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 attributes #0 = { nounwind readnone }