Skip to content

Commit ae61c21

Browse files
committed
Update test files.
As amdgpu-no-flat-scratch-init is set by opt, in most llc tests the attribute is not set. This commit corrects this.
1 parent 084e7c8 commit ae61c21

File tree

92 files changed

+2929
-13890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+2929
-13890
lines changed

llvm/test/CodeGen/AMDGPU/GlobalISel/atomicrmw_udec_wrap.ll

Lines changed: 29 additions & 341 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/GlobalISel/atomicrmw_uinc_wrap.ll

Lines changed: 31 additions & 361 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll

Lines changed: 36 additions & 43 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/GlobalISel/implicit-kernarg-backend-usage-global-isel.ll

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,12 @@ define amdgpu_kernel void @addrspacecast(ptr addrspace(5) %ptr.private, ptr addr
121121
ret void
122122
}
123123

124-
define amdgpu_kernel void @llvm_amdgcn_is_shared(ptr %ptr) {
124+
define amdgpu_kernel void @llvm_amdgcn_is_shared(ptr %ptr) #0 {
125125
; GFX8V4-LABEL: llvm_amdgcn_is_shared:
126126
; GFX8V4: ; %bb.0:
127127
; GFX8V4-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
128128
; GFX8V4-NEXT: s_waitcnt lgkmcnt(0)
129129
; GFX8V4-NEXT: s_load_dword s0, s[6:7], 0x40
130-
; GFX8V4-NEXT: s_add_i32 s12, s12, s17
131-
; GFX8V4-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
132-
; GFX8V4-NEXT: s_mov_b32 flat_scratch_lo, s13
133130
; GFX8V4-NEXT: s_waitcnt lgkmcnt(0)
134131
; GFX8V4-NEXT: s_cmp_eq_u32 s1, s0
135132
; GFX8V4-NEXT: s_cselect_b32 s0, 1, 0
@@ -143,9 +140,6 @@ define amdgpu_kernel void @llvm_amdgcn_is_shared(ptr %ptr) {
143140
; GFX8V5-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
144141
; GFX8V5-NEXT: s_waitcnt lgkmcnt(0)
145142
; GFX8V5-NEXT: s_load_dword s0, s[8:9], 0xcc
146-
; GFX8V5-NEXT: s_add_i32 s12, s12, s17
147-
; GFX8V5-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
148-
; GFX8V5-NEXT: s_mov_b32 flat_scratch_lo, s13
149143
; GFX8V5-NEXT: s_waitcnt lgkmcnt(0)
150144
; GFX8V5-NEXT: s_cmp_eq_u32 s1, s0
151145
; GFX8V5-NEXT: s_cselect_b32 s0, 1, 0
@@ -183,15 +177,12 @@ define amdgpu_kernel void @llvm_amdgcn_is_shared(ptr %ptr) {
183177
ret void
184178
}
185179

186-
define amdgpu_kernel void @llvm_amdgcn_is_private(ptr %ptr) {
180+
define amdgpu_kernel void @llvm_amdgcn_is_private(ptr %ptr) #0 {
187181
; GFX8V4-LABEL: llvm_amdgcn_is_private:
188182
; GFX8V4: ; %bb.0:
189183
; GFX8V4-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
190184
; GFX8V4-NEXT: s_waitcnt lgkmcnt(0)
191185
; GFX8V4-NEXT: s_load_dword s0, s[6:7], 0x44
192-
; GFX8V4-NEXT: s_add_i32 s12, s12, s17
193-
; GFX8V4-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
194-
; GFX8V4-NEXT: s_mov_b32 flat_scratch_lo, s13
195186
; GFX8V4-NEXT: s_waitcnt lgkmcnt(0)
196187
; GFX8V4-NEXT: s_cmp_eq_u32 s1, s0
197188
; GFX8V4-NEXT: s_cselect_b32 s0, 1, 0
@@ -205,9 +196,6 @@ define amdgpu_kernel void @llvm_amdgcn_is_private(ptr %ptr) {
205196
; GFX8V5-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
206197
; GFX8V5-NEXT: s_waitcnt lgkmcnt(0)
207198
; GFX8V5-NEXT: s_load_dword s0, s[8:9], 0xc8
208-
; GFX8V5-NEXT: s_add_i32 s12, s12, s17
209-
; GFX8V5-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
210-
; GFX8V5-NEXT: s_mov_b32 flat_scratch_lo, s13
211199
; GFX8V5-NEXT: s_waitcnt lgkmcnt(0)
212200
; GFX8V5-NEXT: s_cmp_eq_u32 s1, s0
213201
; GFX8V5-NEXT: s_cselect_b32 s0, 1, 0
@@ -245,7 +233,7 @@ define amdgpu_kernel void @llvm_amdgcn_is_private(ptr %ptr) {
245233
ret void
246234
}
247235

248-
define amdgpu_kernel void @llvm_trap() {
236+
define amdgpu_kernel void @llvm_trap() #0 {
249237
; GFX8V4-LABEL: llvm_trap:
250238
; GFX8V4: ; %bb.0:
251239
; GFX8V4-NEXT: s_mov_b64 s[0:1], s[6:7]
@@ -268,7 +256,7 @@ define amdgpu_kernel void @llvm_trap() {
268256
unreachable
269257
}
270258

271-
define amdgpu_kernel void @llvm_debugtrap() {
259+
define amdgpu_kernel void @llvm_debugtrap() #0 {
272260
; GFX8V4-LABEL: llvm_debugtrap:
273261
; GFX8V4: ; %bb.0:
274262
; GFX8V4-NEXT: s_trap 3
@@ -288,13 +276,10 @@ define amdgpu_kernel void @llvm_debugtrap() {
288276
unreachable
289277
}
290278

291-
define amdgpu_kernel void @llvm_amdgcn_queue_ptr(ptr addrspace(1) %ptr) {
279+
define amdgpu_kernel void @llvm_amdgcn_queue_ptr(ptr addrspace(1) %ptr) #0 {
292280
; GFX8V4-LABEL: llvm_amdgcn_queue_ptr:
293281
; GFX8V4: ; %bb.0:
294-
; GFX8V4-NEXT: s_add_i32 s12, s12, s17
295282
; GFX8V4-NEXT: v_mov_b32_e32 v0, s6
296-
; GFX8V4-NEXT: s_mov_b32 flat_scratch_lo, s13
297-
; GFX8V4-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
298283
; GFX8V4-NEXT: v_mov_b32_e32 v1, s7
299284
; GFX8V4-NEXT: s_add_u32 s0, s8, 8
300285
; GFX8V4-NEXT: flat_load_ubyte v0, v[0:1] glc
@@ -320,10 +305,7 @@ define amdgpu_kernel void @llvm_amdgcn_queue_ptr(ptr addrspace(1) %ptr) {
320305
;
321306
; GFX8V5-LABEL: llvm_amdgcn_queue_ptr:
322307
; GFX8V5: ; %bb.0:
323-
; GFX8V5-NEXT: s_add_i32 s12, s12, s17
324308
; GFX8V5-NEXT: v_mov_b32_e32 v0, s6
325-
; GFX8V5-NEXT: s_mov_b32 flat_scratch_lo, s13
326-
; GFX8V5-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
327309
; GFX8V5-NEXT: v_mov_b32_e32 v1, s7
328310
; GFX8V5-NEXT: s_add_u32 s0, s8, 8
329311
; GFX8V5-NEXT: flat_load_ubyte v0, v[0:1] glc
@@ -402,3 +384,5 @@ declare void @llvm.debugtrap()
402384

403385
!llvm.module.flags = !{!0}
404386
!0 = !{i32 1, !"amdhsa_code_object_version", i32 CODE_OBJECT_VERSION}
387+
388+
attributes #0 = { "amdgpu-no-flat-scratch-init" }

llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement-stack-lower.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ define amdgpu_kernel void @v_insert_v64i32_varidx(ptr addrspace(1) %out.ptr, ptr
99
; GCN: ; %bb.0:
1010
; GCN-NEXT: s_load_dwordx4 s[20:23], s[8:9], 0x0
1111
; GCN-NEXT: s_load_dwordx2 s[24:25], s[8:9], 0x10
12-
; GCN-NEXT: s_add_u32 s0, s0, s17
12+
; GCN-NEXT: s_add_u32 s0, s0, s15
1313
; GCN-NEXT: s_addc_u32 s1, s1, 0
1414
; GCN-NEXT: v_mov_b32_e32 v64, 0
1515
; GCN-NEXT: s_waitcnt lgkmcnt(0)
@@ -257,4 +257,4 @@ define amdgpu_kernel void @v_insert_v64i32_varidx(ptr addrspace(1) %out.ptr, ptr
257257
ret void
258258
}
259259

260-
attributes #0 = { "amdgpu-flat-work-group-size"="1,256" "amdgpu-waves-per-eu"="1,10" }
260+
attributes #0 = { "amdgpu-flat-work-group-size"="1,256" "amdgpu-waves-per-eu"="1,10" "amdgpu-no-flat-scratch-init" }

llvm/test/CodeGen/AMDGPU/GlobalISel/lds-global-value.ll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ define amdgpu_kernel void @use_lds_globals(ptr addrspace(1) %out, ptr addrspace(
1111
; CHECK-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
1212
; CHECK-NEXT: v_mov_b32_e32 v0, 4
1313
; CHECK-NEXT: s_mov_b32 m0, -1
14-
; CHECK-NEXT: s_add_i32 s12, s12, s17
1514
; CHECK-NEXT: ds_read_b32 v2, v0
16-
; CHECK-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
15+
; CHECK-NEXT: v_mov_b32_e32 v3, 9
1716
; CHECK-NEXT: s_waitcnt lgkmcnt(0)
1817
; CHECK-NEXT: s_add_u32 s0, s0, 4
1918
; CHECK-NEXT: s_addc_u32 s1, s1, 0
2019
; CHECK-NEXT: v_mov_b32_e32 v0, s0
21-
; CHECK-NEXT: s_mov_b32 flat_scratch_lo, s13
2220
; CHECK-NEXT: v_mov_b32_e32 v1, s1
23-
; CHECK-NEXT: v_mov_b32_e32 v3, 9
2421
; CHECK-NEXT: flat_store_dword v[0:1], v2
2522
; CHECK-NEXT: v_mov_b32_e32 v0, 0x200
2623
; CHECK-NEXT: ds_write_b32 v0, v3
@@ -34,4 +31,4 @@ entry:
3431
ret void
3532
}
3633

37-
attributes #0 = { nounwind }
34+
attributes #0 = { nounwind "amdgpu-no-flat-scratch-init" }

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.if.break.i64.ll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22
; RUN: llc -global-isel -mtriple=amdgcn--amdhsa -mcpu=hawaii -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
33

4-
define amdgpu_kernel void @test_wave64(i32 %arg0, [8 x i32], i64 %saved) {
4+
define amdgpu_kernel void @test_wave64(i32 %arg0, [8 x i32], i64 %saved) #0 {
55
; GCN-LABEL: test_wave64:
66
; GCN: ; %bb.0: ; %entry
77
; GCN-NEXT: s_load_dword s2, s[8:9], 0x0
88
; GCN-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0xa
9-
; GCN-NEXT: s_add_i32 s12, s12, s17
10-
; GCN-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
11-
; GCN-NEXT: s_mov_b32 flat_scratch_lo, s13
129
; GCN-NEXT: s_waitcnt lgkmcnt(0)
1310
; GCN-NEXT: s_cmp_eq_u32 s2, 0
1411
; GCN-NEXT: s_cselect_b32 s2, 1, 0
@@ -28,3 +25,5 @@ entry:
2825
}
2926

3027
declare i64 @llvm.amdgcn.if.break.i64(i1, i64)
28+
29+
attributes #0 = { "amdgpu-no-flat-scratch-init" }

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.trig.preop.ll

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,11 @@ define double @v_trig_preop_f64_imm(double %a, i32 %b) {
3737
ret double %result
3838
}
3939

40-
define amdgpu_kernel void @s_trig_preop_f64(double %a, i32 %b) {
40+
define amdgpu_kernel void @s_trig_preop_f64(double %a, i32 %b) #1 {
4141
; CI-LABEL: s_trig_preop_f64:
4242
; CI: ; %bb.0:
4343
; CI-NEXT: s_load_dword s2, s[8:9], 0x2
4444
; CI-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
45-
; CI-NEXT: s_add_i32 s12, s12, s17
46-
; CI-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
47-
; CI-NEXT: s_mov_b32 flat_scratch_lo, s13
4845
; CI-NEXT: s_waitcnt lgkmcnt(0)
4946
; CI-NEXT: v_mov_b32_e32 v0, s2
5047
; CI-NEXT: v_trig_preop_f64 v[0:1], s[0:1], v0
@@ -62,9 +59,6 @@ define amdgpu_kernel void @s_trig_preop_f64(double %a, i32 %b) {
6259
; VI: ; %bb.0:
6360
; VI-NEXT: s_load_dword s2, s[8:9], 0x8
6461
; VI-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
65-
; VI-NEXT: s_add_i32 s12, s12, s17
66-
; VI-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
67-
; VI-NEXT: s_mov_b32 flat_scratch_lo, s13
6862
; VI-NEXT: s_waitcnt lgkmcnt(0)
6963
; VI-NEXT: v_mov_b32_e32 v0, s2
7064
; VI-NEXT: v_trig_preop_f64 v[0:1], s[0:1], v0
@@ -82,8 +76,6 @@ define amdgpu_kernel void @s_trig_preop_f64(double %a, i32 %b) {
8276
; GFX9: ; %bb.0:
8377
; GFX9-NEXT: s_load_dword s2, s[8:9], 0x8
8478
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
85-
; GFX9-NEXT: s_add_u32 flat_scratch_lo, s12, s17
86-
; GFX9-NEXT: s_addc_u32 flat_scratch_hi, s13, 0
8779
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
8880
; GFX9-NEXT: v_mov_b32_e32 v0, s2
8981
; GFX9-NEXT: v_trig_preop_f64 v[0:1], s[0:1], v0
@@ -93,10 +85,6 @@ define amdgpu_kernel void @s_trig_preop_f64(double %a, i32 %b) {
9385
;
9486
; GFX10-LABEL: s_trig_preop_f64:
9587
; GFX10: ; %bb.0:
96-
; GFX10-NEXT: s_add_u32 s12, s12, s17
97-
; GFX10-NEXT: s_addc_u32 s13, s13, 0
98-
; GFX10-NEXT: s_setreg_b32 hwreg(HW_REG_FLAT_SCR_LO), s12
99-
; GFX10-NEXT: s_setreg_b32 hwreg(HW_REG_FLAT_SCR_HI), s13
10088
; GFX10-NEXT: s_clause 0x1
10189
; GFX10-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
10290
; GFX10-NEXT: s_load_dword s2, s[8:9], 0x8
@@ -121,13 +109,10 @@ define amdgpu_kernel void @s_trig_preop_f64(double %a, i32 %b) {
121109
ret void
122110
}
123111

124-
define amdgpu_kernel void @s_trig_preop_f64_imm(double %a, i32 %b) {
112+
define amdgpu_kernel void @s_trig_preop_f64_imm(double %a, i32 %b) #1 {
125113
; CI-LABEL: s_trig_preop_f64_imm:
126114
; CI: ; %bb.0:
127115
; CI-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
128-
; CI-NEXT: s_add_i32 s12, s12, s17
129-
; CI-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
130-
; CI-NEXT: s_mov_b32 flat_scratch_lo, s13
131116
; CI-NEXT: s_waitcnt lgkmcnt(0)
132117
; CI-NEXT: v_trig_preop_f64 v[0:1], s[0:1], 7
133118
; CI-NEXT: s_add_u32 s0, s0, 4
@@ -143,9 +128,6 @@ define amdgpu_kernel void @s_trig_preop_f64_imm(double %a, i32 %b) {
143128
; VI-LABEL: s_trig_preop_f64_imm:
144129
; VI: ; %bb.0:
145130
; VI-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
146-
; VI-NEXT: s_add_i32 s12, s12, s17
147-
; VI-NEXT: s_lshr_b32 flat_scratch_hi, s12, 8
148-
; VI-NEXT: s_mov_b32 flat_scratch_lo, s13
149131
; VI-NEXT: s_waitcnt lgkmcnt(0)
150132
; VI-NEXT: v_trig_preop_f64 v[0:1], s[0:1], 7
151133
; VI-NEXT: s_add_u32 s0, s0, 4
@@ -161,8 +143,6 @@ define amdgpu_kernel void @s_trig_preop_f64_imm(double %a, i32 %b) {
161143
; GFX9-LABEL: s_trig_preop_f64_imm:
162144
; GFX9: ; %bb.0:
163145
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
164-
; GFX9-NEXT: s_add_u32 flat_scratch_lo, s12, s17
165-
; GFX9-NEXT: s_addc_u32 flat_scratch_hi, s13, 0
166146
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
167147
; GFX9-NEXT: v_trig_preop_f64 v[0:1], s[0:1], 7
168148
; GFX9-NEXT: flat_store_dwordx2 v[0:1], v[0:1]
@@ -171,10 +151,6 @@ define amdgpu_kernel void @s_trig_preop_f64_imm(double %a, i32 %b) {
171151
;
172152
; GFX10-LABEL: s_trig_preop_f64_imm:
173153
; GFX10: ; %bb.0:
174-
; GFX10-NEXT: s_add_u32 s12, s12, s17
175-
; GFX10-NEXT: s_addc_u32 s13, s13, 0
176-
; GFX10-NEXT: s_setreg_b32 hwreg(HW_REG_FLAT_SCR_LO), s12
177-
; GFX10-NEXT: s_setreg_b32 hwreg(HW_REG_FLAT_SCR_HI), s13
178154
; GFX10-NEXT: s_load_dwordx2 s[0:1], s[8:9], 0x0
179155
; GFX10-NEXT: s_waitcnt lgkmcnt(0)
180156
; GFX10-NEXT: v_trig_preop_f64 v[0:1], s[0:1], 7
@@ -198,3 +174,4 @@ define amdgpu_kernel void @s_trig_preop_f64_imm(double %a, i32 %b) {
198174
declare double @llvm.amdgcn.trig.preop.f64(double, i32) #0
199175

200176
attributes #0 = { nounwind readnone speculatable }
177+
attributes #1 = { "amdgpu-no-flat-scratch-init" }

0 commit comments

Comments
 (0)