Skip to content

AMDGPU: Switch a test to generated checks which only tested labels #131257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Mar 14, 2025

Also remove an undef use

Copy link
Contributor Author

arsenm commented Mar 14, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@llvmbot
Copy link
Member

llvmbot commented Mar 14, 2025

@llvm/pr-subscribers-llvm-globalisel

@llvm/pr-subscribers-backend-amdgpu

Author: Matt Arsenault (arsenm)

Changes

Also remove an undef use


Full diff: https://github.com/llvm/llvm-project/pull/131257.diff

1 Files Affected:

  • (modified) llvm/test/CodeGen/AMDGPU/bug-vopc-commute.ll (+47-6)
diff --git a/llvm/test/CodeGen/AMDGPU/bug-vopc-commute.ll b/llvm/test/CodeGen/AMDGPU/bug-vopc-commute.ll
index d198ec28f1602..21d4bcfcdc8c1 100644
--- a/llvm/test/CodeGen/AMDGPU/bug-vopc-commute.ll
+++ b/llvm/test/CodeGen/AMDGPU/bug-vopc-commute.ll
@@ -1,16 +1,58 @@
-; RUN: llc -mtriple=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck %s
-; RUN: llc -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=amdgcn -mcpu=verde < %s | FileCheck -check-prefix=GFX6 %s
+; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefix=GFX8 %s
 
-; CHECK-LABEL: {{^}}main:
-;
 ; Test for compilation only. This generated an invalid machine instruction
 ; by trying to commute the operands of a V_CMP_EQ_i32_e32 instruction, both
 ; of which were in SGPRs.
 define amdgpu_vs float @main(i32 %v) {
+; GFX6-LABEL: main:
+; GFX6:       ; %bb.0: ; %main_body
+; GFX6-NEXT:    s_cbranch_scc1 .LBB0_2
+; GFX6-NEXT:  ; %bb.1: ; %IF57
+; GFX6-NEXT:    v_lshlrev_b32_e32 v0, 1, v0
+; GFX6-NEXT:  .LBB0_2: ; %ENDIF56
+; GFX6-NEXT:    s_buffer_load_dword s0, s[0:3], 0xf0
+; GFX6-NEXT:    s_waitcnt lgkmcnt(0)
+; GFX6-NEXT:    s_cmp_eq_u32 s0, 0
+; GFX6-NEXT:    s_cbranch_scc1 .LBB0_4
+; GFX6-NEXT:  ; %bb.3: ; %IF60
+; GFX6-NEXT:    v_lshlrev_b32_e32 v0, 1, v0
+; GFX6-NEXT:  .LBB0_4: ; %ENDIF59
+; GFX6-NEXT:    s_buffer_load_dword s0, s[0:3], 0xf4
+; GFX6-NEXT:    s_waitcnt lgkmcnt(0)
+; GFX6-NEXT:    s_cmp_eq_u32 s0, 0
+; GFX6-NEXT:    s_cbranch_scc0 .LBB0_6
+; GFX6-NEXT:  ; %bb.5: ; %ENDIF62
+; GFX6-NEXT:    s_branch .LBB0_7
+; GFX6-NEXT:  .LBB0_6: ; %IF63
+; GFX6-NEXT:  .LBB0_7:
+;
+; GFX8-LABEL: main:
+; GFX8:       ; %bb.0: ; %main_body
+; GFX8-NEXT:    s_cbranch_scc1 .LBB0_2
+; GFX8-NEXT:  ; %bb.1: ; %IF57
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 1, v0
+; GFX8-NEXT:  .LBB0_2: ; %ENDIF56
+; GFX8-NEXT:    s_buffer_load_dword s0, s[0:3], 0x3c0
+; GFX8-NEXT:    s_waitcnt lgkmcnt(0)
+; GFX8-NEXT:    s_cmp_eq_u32 s0, 0
+; GFX8-NEXT:    s_cbranch_scc1 .LBB0_4
+; GFX8-NEXT:  ; %bb.3: ; %IF60
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 1, v0
+; GFX8-NEXT:  .LBB0_4: ; %ENDIF59
+; GFX8-NEXT:    s_buffer_load_dword s0, s[0:3], 0x3d0
+; GFX8-NEXT:    s_waitcnt lgkmcnt(0)
+; GFX8-NEXT:    s_cmp_eq_u32 s0, 0
+; GFX8-NEXT:    s_cbranch_scc0 .LBB0_6
+; GFX8-NEXT:  ; %bb.5: ; %ENDIF62
+; GFX8-NEXT:    s_branch .LBB0_7
+; GFX8-NEXT:  .LBB0_6: ; %IF63
+; GFX8-NEXT:  .LBB0_7:
 main_body:
   %d1 = call float @llvm.amdgcn.s.buffer.load.f32(<4 x i32> poison, i32 960, i32 0)
   %d2 = call float @llvm.amdgcn.s.buffer.load.f32(<4 x i32> poison, i32 976, i32 0)
-  br i1 undef, label %ENDIF56, label %IF57
+  br i1 poison, label %ENDIF56, label %IF57
 
 IF57:                                             ; preds = %ENDIF
   %v.1 = mul i32 %v, 2
@@ -40,7 +82,6 @@ ENDIF62:                                          ; preds = %ENDIF59
   ret float %r
 }
 
-; Function Attrs: nounwind readnone
 declare float @llvm.amdgcn.s.buffer.load.f32(<4 x i32>, i32, i32) #0
 
 attributes #0 = { nounwind readnone }

@arsenm arsenm force-pushed the users/arsenm/amdgpu/use-generated-checks-label-only-test branch from 568de61 to 77fef8e Compare March 14, 2025 04:47
@arsenm arsenm force-pushed the users/arsenm/amdgpu/use-poison-in-subreg-coalescer-crash-test branch from c2d9e5b to 5202d32 Compare March 14, 2025 04:47
Copy link
Contributor Author

arsenm commented Mar 14, 2025

Merge activity

  • Mar 14, 3:38 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Mar 14, 3:52 AM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 14, 3:54 AM EDT: A user merged this pull request with Graphite.

@arsenm arsenm force-pushed the users/arsenm/amdgpu/use-poison-in-subreg-coalescer-crash-test branch from 5202d32 to d0881ae Compare March 14, 2025 07:48
Base automatically changed from users/arsenm/amdgpu/use-poison-in-subreg-coalescer-crash-test to main March 14, 2025 07:51
@arsenm arsenm force-pushed the users/arsenm/amdgpu/use-generated-checks-label-only-test branch from 77fef8e to a5c793b Compare March 14, 2025 07:51
@arsenm arsenm merged commit 9b83ffb into main Mar 14, 2025
6 of 10 checks passed
@arsenm arsenm deleted the users/arsenm/amdgpu/use-generated-checks-label-only-test branch March 14, 2025 07:54
frederik-h pushed a commit to frederik-h/llvm-project that referenced this pull request Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants