Skip to content

Commit 94e4ef5

Browse files
authored
[AMDGPU] gfx1250 waitcnt related codegen tests update. NFC (#155317)
1 parent f3ea46a commit 94e4ef5

File tree

2 files changed

+48
-24
lines changed

2 files changed

+48
-24
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
; RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx1250 < %s 2>&1 | FileCheck -check-prefix=ERR %s
2+
3+
; ERR: LLVM ERROR: Cannot select: intrinsic %llvm.amdgcn.s.waitcnt
4+
5+
define amdgpu_kernel void @test_waitcnt_builtin() {
6+
call void @llvm.amdgcn.s.waitcnt(i32 0)
7+
ret void
8+
}
9+
10+
declare void @llvm.amdgcn.s.waitcnt(i32)
Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2-
# RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -run-pass=si-memory-legalizer %s -o - | FileCheck -check-prefix=GFX12 %s
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -run-pass=si-memory-legalizer %s -o - | FileCheck --check-prefix=GFX1200 %s
3+
# RUN: llc -mtriple=amdgcn -mcpu=gfx1250 -run-pass=si-memory-legalizer %s -o - | FileCheck --check-prefix=GFX1250 %s
34

45
---
56
name: intrinsic_store_system_scope
67
body: |
78
bb.0:
89
liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4, $vgpr0, $vgpr1, $vgpr2
910
10-
; GFX12-LABEL: name: intrinsic_store_system_scope
11-
; GFX12: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4, $vgpr0, $vgpr1, $vgpr2
12-
; GFX12-NEXT: {{ $}}
13-
; GFX12-NEXT: S_WAIT_LOADCNT_soft 0
14-
; GFX12-NEXT: S_WAIT_SAMPLECNT_soft 0
15-
; GFX12-NEXT: S_WAIT_BVHCNT_soft 0
16-
; GFX12-NEXT: S_WAIT_KMCNT_soft 0
17-
; GFX12-NEXT: S_WAIT_STORECNT_soft 0
18-
; GFX12-NEXT: BUFFER_STORE_DWORD_VBUFFER_BOTHEN_exact killed renamable $vgpr0, killed renamable $vgpr1_vgpr2, killed renamable $sgpr0_sgpr1_sgpr2_sgpr3, killed renamable $sgpr4, 0, 24, 0, implicit $exec :: (dereferenceable store (s32), align 1, addrspace 8)
19-
; GFX12-NEXT: S_ENDPGM 0
20-
BUFFER_STORE_DWORD_VBUFFER_BOTHEN_exact killed renamable $vgpr0, killed renamable $vgpr1_vgpr2, killed renamable $sgpr0_sgpr1_sgpr2_sgpr3, killed renamable $sgpr4, 0, 24, 0, implicit $exec :: (dereferenceable store (s32), align 1, addrspace 8)
11+
; GFX1200-LABEL: name: intrinsic_store_system_scope
12+
; GFX1200: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4, $vgpr0, $vgpr1, $vgpr2
13+
; GFX1200-NEXT: {{ $}}
14+
; GFX1200-NEXT: S_WAIT_LOADCNT_soft 0
15+
; GFX1200-NEXT: S_WAIT_SAMPLECNT_soft 0
16+
; GFX1200-NEXT: S_WAIT_BVHCNT_soft 0
17+
; GFX1200-NEXT: S_WAIT_KMCNT_soft 0
18+
; GFX1200-NEXT: S_WAIT_STORECNT_soft 0
19+
; GFX1200-NEXT: BUFFER_STORE_DWORD_VBUFFER_BOTHEN_exact killed renamable $vgpr0, killed renamable $vgpr2_vgpr3, killed renamable $sgpr0_sgpr1_sgpr2_sgpr3, killed renamable $sgpr4, 0, 24, 0, implicit $exec :: (dereferenceable store (s32), align 1, addrspace 8)
20+
; GFX1200-NEXT: S_ENDPGM 0
21+
;
22+
; GFX1250-LABEL: name: intrinsic_store_system_scope
23+
; GFX1250: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4, $vgpr0, $vgpr1, $vgpr2
24+
; GFX1250-NEXT: {{ $}}
25+
; GFX1250-NEXT: BUFFER_STORE_DWORD_VBUFFER_BOTHEN_exact killed renamable $vgpr0, killed renamable $vgpr2_vgpr3, killed renamable $sgpr0_sgpr1_sgpr2_sgpr3, killed renamable $sgpr4, 0, 24, 0, implicit $exec :: (dereferenceable store (s32), align 1, addrspace 8)
26+
; GFX1250-NEXT: S_ENDPGM 0
27+
BUFFER_STORE_DWORD_VBUFFER_BOTHEN_exact killed renamable $vgpr0, killed renamable $vgpr2_vgpr3, killed renamable $sgpr0_sgpr1_sgpr2_sgpr3, killed renamable $sgpr4, 0, 24, 0, implicit $exec :: (dereferenceable store (s32), align 1, addrspace 8)
2128
S_ENDPGM 0
2229
...
2330

@@ -27,17 +34,24 @@ body: |
2734
bb.0:
2835
liveins: $vgpr0, $vgpr1, $vgpr2
2936
30-
; GFX12-LABEL: name: generic_store_volatile
31-
; GFX12: liveins: $vgpr0, $vgpr1, $vgpr2
32-
; GFX12-NEXT: {{ $}}
33-
; GFX12-NEXT: S_WAIT_LOADCNT_soft 0
34-
; GFX12-NEXT: S_WAIT_SAMPLECNT_soft 0
35-
; GFX12-NEXT: S_WAIT_BVHCNT_soft 0
36-
; GFX12-NEXT: S_WAIT_KMCNT_soft 0
37-
; GFX12-NEXT: S_WAIT_STORECNT_soft 0
38-
; GFX12-NEXT: GLOBAL_STORE_DWORD killed renamable $vgpr1_vgpr2, killed renamable $vgpr0, 0, 24, implicit $exec :: (volatile store (s32), addrspace 1)
39-
; GFX12-NEXT: S_WAIT_STORECNT_soft 0
40-
; GFX12-NEXT: S_ENDPGM 0
41-
GLOBAL_STORE_DWORD killed renamable $vgpr1_vgpr2, killed renamable $vgpr0, 0, 0, implicit $exec :: (volatile store (s32), addrspace 1)
37+
; GFX1200-LABEL: name: generic_store_volatile
38+
; GFX1200: liveins: $vgpr0, $vgpr1, $vgpr2
39+
; GFX1200-NEXT: {{ $}}
40+
; GFX1200-NEXT: S_WAIT_LOADCNT_soft 0
41+
; GFX1200-NEXT: S_WAIT_SAMPLECNT_soft 0
42+
; GFX1200-NEXT: S_WAIT_BVHCNT_soft 0
43+
; GFX1200-NEXT: S_WAIT_KMCNT_soft 0
44+
; GFX1200-NEXT: S_WAIT_STORECNT_soft 0
45+
; GFX1200-NEXT: GLOBAL_STORE_DWORD killed renamable $vgpr2_vgpr3, killed renamable $vgpr0, 0, 24, implicit $exec :: (volatile store (s32), addrspace 1)
46+
; GFX1200-NEXT: S_WAIT_STORECNT_soft 0
47+
; GFX1200-NEXT: S_ENDPGM 0
48+
;
49+
; GFX1250-LABEL: name: generic_store_volatile
50+
; GFX1250: liveins: $vgpr0, $vgpr1, $vgpr2
51+
; GFX1250-NEXT: {{ $}}
52+
; GFX1250-NEXT: GLOBAL_STORE_DWORD killed renamable $vgpr2_vgpr3, killed renamable $vgpr0, 0, 24, implicit $exec :: (volatile store (s32), addrspace 1)
53+
; GFX1250-NEXT: S_WAIT_STORECNT_soft 0
54+
; GFX1250-NEXT: S_ENDPGM 0
55+
GLOBAL_STORE_DWORD killed renamable $vgpr2_vgpr3, killed renamable $vgpr0, 0, 0, implicit $exec :: (volatile store (s32), addrspace 1)
4256
S_ENDPGM 0
4357
...

0 commit comments

Comments
 (0)