Skip to content

AMDGPU: Switch a test with only function label checks to generated #131255

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

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Mar 14, 2025

I suspect the first function at least is not usefully testing
the original failure.

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

I suspect the first function at least is not usefully testing
the original failure.


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

1 Files Affected:

  • (modified) llvm/test/CodeGen/AMDGPU/subreg-coalescer-crash.ll (+32-5)
diff --git a/llvm/test/CodeGen/AMDGPU/subreg-coalescer-crash.ll b/llvm/test/CodeGen/AMDGPU/subreg-coalescer-crash.ll
index 19c43fa22271b..a0ac6c1b28449 100644
--- a/llvm/test/CodeGen/AMDGPU/subreg-coalescer-crash.ll
+++ b/llvm/test/CodeGen/AMDGPU/subreg-coalescer-crash.ll
@@ -1,8 +1,13 @@
-; RUN: llc -mtriple=amdgcn -mcpu=tahiti -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
-; RUN: llc -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=amdgcn -mcpu=tahiti -o - %s | FileCheck -check-prefixes=GCN,GFX6 %s
+; RUN: llc -mtriple=amdgcn -mcpu=tonga -o - %s | FileCheck -check-prefixes=GCN,GFX8 %s
 
-; GCN-LABEL:{{^}}row_filter_C1_D0:
 define amdgpu_kernel void @row_filter_C1_D0() #0 {
+; GCN-LABEL: row_filter_C1_D0:
+; GCN:       ; %bb.0: ; %entry
+; GCN-NEXT:    s_cbranch_scc1 .LBB0_2
+; GCN-NEXT:  ; %bb.1: ; %do.body.preheader
+; GCN-NEXT:  .LBB0_2: ; %for.inc.1
 entry:
   br i1 undef, label %for.inc.1, label %do.body.preheader
 
@@ -40,9 +45,28 @@ for.inc.1:                                        ; preds = %do.body.1562.prehea
   unreachable
 }
 
-; GCN-LABEL: {{^}}foo:
-; GCN: s_endpgm
 define amdgpu_ps void @foo() #0 {
+; GCN-LABEL: foo:
+; GCN:       ; %bb.0: ; %bb
+; GCN-NEXT:    s_mov_b64 s[0:1], -1
+; GCN-NEXT:    s_cbranch_scc0 .LBB1_2
+; GCN-NEXT:  ; %bb.1: ; %bb24
+; GCN-NEXT:    s_mov_b64 s[0:1], 0
+; GCN-NEXT:  .LBB1_2: ; %Flow1
+; GCN-NEXT:    s_and_b64 vcc, exec, s[0:1]
+; GCN-NEXT:    s_cbranch_vccz .LBB1_4
+; GCN-NEXT:  ; %bb.3: ; %bb9
+; GCN-NEXT:    image_sample v[0:1], v0, s[0:7], s[0:3] dmask:0xa
+; GCN-NEXT:    s_branch .LBB1_5
+; GCN-NEXT:  .LBB1_4:
+; GCN-NEXT:    v_mov_b32_e32 v1, 0
+; GCN-NEXT:    v_mov_b32_e32 v0, v1
+; GCN-NEXT:  .LBB1_5: ; %bb14
+; GCN-NEXT:    s_waitcnt vmcnt(0)
+; GCN-NEXT:    v_mul_f32_e32 v0, 0x41280000, v0
+; GCN-NEXT:    v_mul_f32_e32 v1, 0x41380000, v1
+; GCN-NEXT:    exp mrt0 v1, v0, v0, v0 done vm
+; GCN-NEXT:    s_endpgm
 bb:
   br i1 undef, label %bb2, label %bb1
 
@@ -101,3 +125,6 @@ declare <4 x float> @llvm.amdgcn.image.sample.1d.v4f32.f32(i32, float, <8 x i32>
 
 attributes #0 = { nounwind }
 attributes #1 = { nounwind readonly }
+;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
+; GFX6: {{.*}}
+; GFX8: {{.*}}

Copy link
Contributor

IMHO, in addition to the manual efforts you’re making now, we should enforce the use of auto-generated check lines whenever possible.

@arsenm arsenm force-pushed the users/arsenm/amdgpu/switch-subreg-coalescer-crash-test-to-generated-checks branch from a0b3a1c to 9eeb3a6 Compare March 14, 2025 04:47
@arsenm arsenm force-pushed the users/arsenm/amdgpu/replace-undef-uses-with-poison-mir branch from a9ed4e3 to 2e03138 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:46 AM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 14, 3:48 AM EDT: A user merged this pull request with Graphite.

@arsenm arsenm force-pushed the users/arsenm/amdgpu/replace-undef-uses-with-poison-mir branch from 2e03138 to d082d36 Compare March 14, 2025 07:42
Base automatically changed from users/arsenm/amdgpu/replace-undef-uses-with-poison-mir to main March 14, 2025 07:45
I suspect the first function at least is not usefully testing
the original failure.
@arsenm arsenm force-pushed the users/arsenm/amdgpu/switch-subreg-coalescer-crash-test-to-generated-checks branch from 9eeb3a6 to 2108946 Compare March 14, 2025 07:46
@arsenm arsenm merged commit 3529c64 into main Mar 14, 2025
6 of 10 checks passed
@arsenm arsenm deleted the users/arsenm/amdgpu/switch-subreg-coalescer-crash-test-to-generated-checks branch March 14, 2025 07:48
frederik-h pushed a commit to frederik-h/llvm-project that referenced this pull request Mar 18, 2025
…lvm#131255)

I suspect the first function at least is not usefully testing
the original failure.
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