Skip to content

Commit 9b83ffb

Browse files
authored
AMDGPU: Switch a test to generated checks which only tested labels (llvm#131257)
Also remove an undef use
1 parent 8d0205f commit 9b83ffb

File tree

1 file changed

+47
-6
lines changed

1 file changed

+47
-6
lines changed

llvm/test/CodeGen/AMDGPU/bug-vopc-commute.ll

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,58 @@
1-
; RUN: llc -mtriple=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck %s
2-
; RUN: llc -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck %s
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: llc -mtriple=amdgcn -mcpu=verde < %s | FileCheck -check-prefix=GFX6 %s
3+
; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefix=GFX8 %s
34

4-
; CHECK-LABEL: {{^}}main:
5-
;
65
; Test for compilation only. This generated an invalid machine instruction
76
; by trying to commute the operands of a V_CMP_EQ_i32_e32 instruction, both
87
; of which were in SGPRs.
98
define amdgpu_vs float @main(i32 %v) {
9+
; GFX6-LABEL: main:
10+
; GFX6: ; %bb.0: ; %main_body
11+
; GFX6-NEXT: s_cbranch_scc1 .LBB0_2
12+
; GFX6-NEXT: ; %bb.1: ; %IF57
13+
; GFX6-NEXT: v_lshlrev_b32_e32 v0, 1, v0
14+
; GFX6-NEXT: .LBB0_2: ; %ENDIF56
15+
; GFX6-NEXT: s_buffer_load_dword s0, s[0:3], 0xf0
16+
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
17+
; GFX6-NEXT: s_cmp_eq_u32 s0, 0
18+
; GFX6-NEXT: s_cbranch_scc1 .LBB0_4
19+
; GFX6-NEXT: ; %bb.3: ; %IF60
20+
; GFX6-NEXT: v_lshlrev_b32_e32 v0, 1, v0
21+
; GFX6-NEXT: .LBB0_4: ; %ENDIF59
22+
; GFX6-NEXT: s_buffer_load_dword s0, s[0:3], 0xf4
23+
; GFX6-NEXT: s_waitcnt lgkmcnt(0)
24+
; GFX6-NEXT: s_cmp_eq_u32 s0, 0
25+
; GFX6-NEXT: s_cbranch_scc0 .LBB0_6
26+
; GFX6-NEXT: ; %bb.5: ; %ENDIF62
27+
; GFX6-NEXT: s_branch .LBB0_7
28+
; GFX6-NEXT: .LBB0_6: ; %IF63
29+
; GFX6-NEXT: .LBB0_7:
30+
;
31+
; GFX8-LABEL: main:
32+
; GFX8: ; %bb.0: ; %main_body
33+
; GFX8-NEXT: s_cbranch_scc1 .LBB0_2
34+
; GFX8-NEXT: ; %bb.1: ; %IF57
35+
; GFX8-NEXT: v_lshlrev_b32_e32 v0, 1, v0
36+
; GFX8-NEXT: .LBB0_2: ; %ENDIF56
37+
; GFX8-NEXT: s_buffer_load_dword s0, s[0:3], 0x3c0
38+
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
39+
; GFX8-NEXT: s_cmp_eq_u32 s0, 0
40+
; GFX8-NEXT: s_cbranch_scc1 .LBB0_4
41+
; GFX8-NEXT: ; %bb.3: ; %IF60
42+
; GFX8-NEXT: v_lshlrev_b32_e32 v0, 1, v0
43+
; GFX8-NEXT: .LBB0_4: ; %ENDIF59
44+
; GFX8-NEXT: s_buffer_load_dword s0, s[0:3], 0x3d0
45+
; GFX8-NEXT: s_waitcnt lgkmcnt(0)
46+
; GFX8-NEXT: s_cmp_eq_u32 s0, 0
47+
; GFX8-NEXT: s_cbranch_scc0 .LBB0_6
48+
; GFX8-NEXT: ; %bb.5: ; %ENDIF62
49+
; GFX8-NEXT: s_branch .LBB0_7
50+
; GFX8-NEXT: .LBB0_6: ; %IF63
51+
; GFX8-NEXT: .LBB0_7:
1052
main_body:
1153
%d1 = call float @llvm.amdgcn.s.buffer.load.f32(<4 x i32> poison, i32 960, i32 0)
1254
%d2 = call float @llvm.amdgcn.s.buffer.load.f32(<4 x i32> poison, i32 976, i32 0)
13-
br i1 undef, label %ENDIF56, label %IF57
55+
br i1 poison, label %ENDIF56, label %IF57
1456

1557
IF57: ; preds = %ENDIF
1658
%v.1 = mul i32 %v, 2
@@ -40,7 +82,6 @@ ENDIF62: ; preds = %ENDIF59
4082
ret float %r
4183
}
4284

43-
; Function Attrs: nounwind readnone
4485
declare float @llvm.amdgcn.s.buffer.load.f32(<4 x i32>, i32, i32) #0
4586

4687
attributes #0 = { nounwind readnone }

0 commit comments

Comments
 (0)