Skip to content

Commit 2edc730

Browse files
committed
[AMDGPU] auto update some tests to prepare for future changes
1 parent d8ea88f commit 2edc730

File tree

2 files changed

+95
-11
lines changed

2 files changed

+95
-11
lines changed

llvm/test/CodeGen/AMDGPU/memory-legalizer-atomic-insert-end.mir

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
12
# RUN: llc -mtriple=amdgcn -run-pass=si-memory-legalizer %s -o - | FileCheck %s
23

34
--- |
@@ -39,12 +40,7 @@
3940
...
4041
---
4142

42-
# CHECK-LABEL: name: atomic_max_i32_noret
4343

44-
# CHECK-LABEL: bb.1.atomic:
45-
# CHECK: BUFFER_ATOMIC_SMAX_ADDR64
46-
# CHECK-NEXT: S_WAITCNT_soft 3952
47-
# CHECK-NEXT: BUFFER_WBINVL1_VOL
4844

4945
name: atomic_max_i32_noret
5046
alignment: 1
@@ -71,6 +67,46 @@ frameInfo:
7167
hasVAStart: false
7268
hasMustTailInVarArgFunc: false
7369
body: |
70+
; CHECK-LABEL: name: atomic_max_i32_noret
71+
; CHECK: bb.0 (%ir-block.0):
72+
; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
73+
; CHECK-NEXT: liveins: $vgpr0, $sgpr0_sgpr1
74+
; CHECK-NEXT: {{ $}}
75+
; CHECK-NEXT: $sgpr4_sgpr5 = S_LOAD_DWORDX2_IMM $sgpr0_sgpr1, 11, 0 :: (non-temporal dereferenceable invariant load (s64) from `ptr addrspace(4) poison`, addrspace 4)
76+
; CHECK-NEXT: $vgpr1 = V_ASHRREV_I32_e32 31, $vgpr0, implicit $exec
77+
; CHECK-NEXT: $vgpr1_vgpr2 = V_LSHL_B64_e64 $vgpr0_vgpr1, 3, implicit $exec
78+
; CHECK-NEXT: $sgpr7 = S_MOV_B32 61440
79+
; CHECK-NEXT: $sgpr6 = S_MOV_B32 0
80+
; CHECK-NEXT: S_WAITCNT 127
81+
; CHECK-NEXT: $vgpr1_vgpr2 = BUFFER_LOAD_DWORDX2_ADDR64 killed $vgpr1_vgpr2, $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0, 1, 0, implicit $exec :: (volatile load (s64) from %ir.tid.gep, addrspace 1)
82+
; CHECK-NEXT: S_WAITCNT_soft 3952
83+
; CHECK-NEXT: $vgpr0 = V_XOR_B32_e32 1, killed $vgpr0, implicit $exec
84+
; CHECK-NEXT: V_CMP_NE_U32_e32 0, killed $vgpr0, implicit-def $vcc, implicit $exec
85+
; CHECK-NEXT: $sgpr2_sgpr3 = S_AND_SAVEEXEC_B64 killed $vcc, implicit-def $exec, implicit-def $scc, implicit $exec
86+
; CHECK-NEXT: $sgpr2_sgpr3 = S_XOR_B64 $exec, killed $sgpr2_sgpr3, implicit-def dead $scc
87+
; CHECK-NEXT: S_CBRANCH_EXECZ %bb.2, implicit $exec
88+
; CHECK-NEXT: {{ $}}
89+
; CHECK-NEXT: bb.1.atomic:
90+
; CHECK-NEXT: successors: %bb.2(0x80000000)
91+
; CHECK-NEXT: liveins: $sgpr4_sgpr5_sgpr6_sgpr7:0x000000000000000C, $sgpr0_sgpr1, $sgpr2_sgpr3, $vgpr1_vgpr2_vgpr3_vgpr4:0x0000000000000003
92+
; CHECK-NEXT: {{ $}}
93+
; CHECK-NEXT: $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 15, 0 :: (non-temporal dereferenceable invariant load (s32) from `ptr addrspace(4) poison`, addrspace 4)
94+
; CHECK-NEXT: dead $vgpr0 = V_MOV_B32_e32 -1, implicit $exec
95+
; CHECK-NEXT: dead $vgpr0 = V_MOV_B32_e32 61440, implicit $exec
96+
; CHECK-NEXT: $sgpr4_sgpr5 = S_MOV_B64 0
97+
; CHECK-NEXT: S_WAITCNT 127
98+
; CHECK-NEXT: $vgpr0 = V_MOV_B32_e32 killed $sgpr0, implicit $exec, implicit $exec
99+
; CHECK-NEXT: S_WAITCNT 3952
100+
; CHECK-NEXT: S_WAITCNT_soft 3952
101+
; CHECK-NEXT: BUFFER_ATOMIC_SMAX_ADDR64 killed $vgpr0, killed $vgpr1_vgpr2, killed $sgpr4_sgpr5_sgpr6_sgpr7, 0, 400, 0, implicit $exec :: (volatile load syncscope("one-as") seq_cst (s32) from %ir.gep, addrspace 1)
102+
; CHECK-NEXT: S_WAITCNT_soft 3952
103+
; CHECK-NEXT: BUFFER_WBINVL1_VOL implicit $exec
104+
; CHECK-NEXT: {{ $}}
105+
; CHECK-NEXT: bb.2.exit:
106+
; CHECK-NEXT: liveins: $sgpr2_sgpr3
107+
; CHECK-NEXT: {{ $}}
108+
; CHECK-NEXT: $exec = S_OR_B64 $exec, killed $sgpr2_sgpr3, implicit-def $scc
109+
; CHECK-NEXT: S_ENDPGM 0
74110
bb.0 (%ir-block.0):
75111
successors: %bb.1.atomic(0x40000000), %bb.2.exit(0x40000000)
76112
liveins: $vgpr0, $sgpr0_sgpr1

llvm/test/CodeGen/AMDGPU/memory-legalizer-multiple-mem-operands-atomics.mir

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,65 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
12
# RUN: llc -mtriple=amdgcn -mcpu=gfx803 -run-pass si-memory-legalizer %s -o - | FileCheck -check-prefix=GCN %s
23

34
---
45

5-
# GCN-LABEL: name: multiple_mem_operands
66

7-
# GCN-LABEL: bb.3:
8-
# GCN: S_WAITCNT_soft 3952
9-
# GCN-NEXT: BUFFER_LOAD_DWORD_OFFEN
10-
# GCN-NEXT: S_WAITCNT_soft 3952
11-
# GCN-NEXT: BUFFER_WBINVL1_VOL
127

138
name: multiple_mem_operands
149
body: |
10+
; GCN-LABEL: name: multiple_mem_operands
11+
; GCN: bb.0.entry:
12+
; GCN-NEXT: successors: %bb.2(0x30000000), %bb.1(0x50000000)
13+
; GCN-NEXT: liveins: $sgpr0_sgpr1, $sgpr3
14+
; GCN-NEXT: {{ $}}
15+
; GCN-NEXT: $sgpr2 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 44, 0 :: (non-temporal dereferenceable invariant load (s32) from `ptr addrspace(4) poison`, addrspace 4)
16+
; GCN-NEXT: $sgpr8 = S_MOV_B32 &SCRATCH_RSRC_DWORD0, implicit-def $sgpr8_sgpr9_sgpr10_sgpr11
17+
; GCN-NEXT: $sgpr4_sgpr5 = S_LOAD_DWORDX2_IMM $sgpr0_sgpr1, 36, 0 :: (non-temporal dereferenceable invariant load (s64) from `ptr addrspace(4) poison`, addrspace 4)
18+
; GCN-NEXT: $sgpr9 = S_MOV_B32 &SCRATCH_RSRC_DWORD1, implicit-def $sgpr8_sgpr9_sgpr10_sgpr11
19+
; GCN-NEXT: $sgpr10 = S_MOV_B32 4294967295, implicit-def $sgpr8_sgpr9_sgpr10_sgpr11
20+
; GCN-NEXT: $sgpr11 = S_MOV_B32 15204352, implicit-def $sgpr8_sgpr9_sgpr10_sgpr11
21+
; GCN-NEXT: $vgpr0 = V_MOV_B32_e32 1, implicit $exec
22+
; GCN-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr8_sgpr9_sgpr10_sgpr11, $sgpr3, 4, 0, 0, implicit $exec :: (store (s32) into `ptr addrspace(5) poison`, addrspace 5)
23+
; GCN-NEXT: S_WAITCNT 127
24+
; GCN-NEXT: S_CMP_LG_U32 killed $sgpr2, 0, implicit-def $scc
25+
; GCN-NEXT: S_WAITCNT 3855
26+
; GCN-NEXT: $vgpr0 = V_MOV_B32_e32 2, implicit $exec
27+
; GCN-NEXT: $vgpr1 = V_MOV_B32_e32 32772, implicit $exec
28+
; GCN-NEXT: BUFFER_STORE_DWORD_OFFEN killed $vgpr0, killed $vgpr1, $sgpr8_sgpr9_sgpr10_sgpr11, $sgpr3, 0, 0, 0, implicit $exec :: (store (s32) into `ptr addrspace(5) poison`, addrspace 5)
29+
; GCN-NEXT: S_CBRANCH_SCC0 %bb.2, implicit killed $scc
30+
; GCN-NEXT: {{ $}}
31+
; GCN-NEXT: bb.1:
32+
; GCN-NEXT: successors: %bb.3(0x80000000)
33+
; GCN-NEXT: liveins: $sgpr0_sgpr1, $sgpr4_sgpr5, $sgpr3, $sgpr8_sgpr9_sgpr10_sgpr11
34+
; GCN-NEXT: {{ $}}
35+
; GCN-NEXT: $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 52, 0 :: (non-temporal dereferenceable invariant load (s32) from `ptr addrspace(4) poison`, addrspace 4)
36+
; GCN-NEXT: S_WAITCNT 3855
37+
; GCN-NEXT: $vgpr0 = V_MOV_B32_e32 32772, implicit $exec
38+
; GCN-NEXT: S_BRANCH %bb.3
39+
; GCN-NEXT: {{ $}}
40+
; GCN-NEXT: bb.2:
41+
; GCN-NEXT: successors: %bb.3(0x80000000)
42+
; GCN-NEXT: liveins: $sgpr0_sgpr1, $sgpr4_sgpr5, $sgpr3, $sgpr8_sgpr9_sgpr10_sgpr11
43+
; GCN-NEXT: {{ $}}
44+
; GCN-NEXT: $sgpr0 = S_LOAD_DWORD_IMM killed $sgpr0_sgpr1, 48, 0 :: (non-temporal dereferenceable invariant load (s32) from `ptr addrspace(4) poison`, addrspace 4)
45+
; GCN-NEXT: S_WAITCNT 3855
46+
; GCN-NEXT: $vgpr0 = V_MOV_B32_e32 4, implicit $exec
47+
; GCN-NEXT: {{ $}}
48+
; GCN-NEXT: bb.3:
49+
; GCN-NEXT: liveins: $sgpr3, $sgpr4_sgpr5, $sgpr8_sgpr9_sgpr10_sgpr11, $vgpr0, $sgpr0
50+
; GCN-NEXT: {{ $}}
51+
; GCN-NEXT: S_WAITCNT 127
52+
; GCN-NEXT: $sgpr0 = S_LSHL_B32 killed $sgpr0, 2, implicit-def dead $scc
53+
; GCN-NEXT: $vgpr0 = V_ADD_CO_U32_e32 killed $sgpr0, killed $vgpr0, implicit-def dead $vcc, implicit $exec
54+
; GCN-NEXT: S_WAITCNT_soft 3952
55+
; GCN-NEXT: $vgpr0 = BUFFER_LOAD_DWORD_OFFEN killed $vgpr0, killed $sgpr8_sgpr9_sgpr10_sgpr11, $sgpr3, 0, 1, 0, implicit $exec :: (load syncscope("agent-one-as") unordered (s32) from `ptr addrspace(1) poison`, addrspace 1), (load syncscope("workgroup-one-as") seq_cst (s32) from `ptr addrspace(5) poison`, addrspace 5)
56+
; GCN-NEXT: S_WAITCNT_soft 3952
57+
; GCN-NEXT: BUFFER_WBINVL1_VOL implicit $exec
58+
; GCN-NEXT: $vgpr1 = V_MOV_B32_e32 $sgpr4, implicit $exec, implicit-def $vgpr1_vgpr2, implicit $sgpr4_sgpr5
59+
; GCN-NEXT: $vgpr2 = V_MOV_B32_e32 killed $sgpr5, implicit $exec, implicit $sgpr4_sgpr5, implicit $exec
60+
; GCN-NEXT: S_WAITCNT 3952
61+
; GCN-NEXT: FLAT_STORE_DWORD killed $vgpr1_vgpr2, killed $vgpr0, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into `ptr addrspace(1) poison`, addrspace 1)
62+
; GCN-NEXT: S_ENDPGM 0
1563
bb.0.entry:
1664
successors: %bb.1(0x30000000), %bb.2(0x50000000)
1765
liveins: $sgpr0_sgpr1, $sgpr3

0 commit comments

Comments
 (0)