-
Notifications
You must be signed in to change notification settings - Fork 13.6k
AMDGPU: Use generated tests in reg-coalescer-sched-crash.ll test #131259
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
arsenm
merged 1 commit into
main
from
users/arsenm/amdgpu/use-generated-checks-reg-coalescer-sched-crash
Mar 14, 2025
Merged
AMDGPU: Use generated tests in reg-coalescer-sched-crash.ll test #131259
arsenm
merged 1 commit into
main
from
users/arsenm/amdgpu/use-generated-checks-reg-coalescer-sched-crash
Mar 14, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Mar 14, 2025
@llvm/pr-subscribers-llvm-globalisel Author: Matt Arsenault (arsenm) ChangesThis wasn't checking anything. Also remove undef uses. Full diff: https://github.com/llvm/llvm-project/pull/131259.diff 1 Files Affected:
diff --git a/llvm/test/CodeGen/AMDGPU/reg-coalescer-sched-crash.ll b/llvm/test/CodeGen/AMDGPU/reg-coalescer-sched-crash.ll
index 51072c36dadd2..a3b3831f5b954 100644
--- a/llvm/test/CodeGen/AMDGPU/reg-coalescer-sched-crash.ll
+++ b/llvm/test/CodeGen/AMDGPU/reg-coalescer-sched-crash.ll
@@ -1,5 +1,6 @@
-; RUN: llc -mtriple=amdgcn -verify-machineinstrs -o /dev/null < %s
-; RUN: llc -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs -o /dev/null < %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=amdgcn -mcpu=tahiti < %s | FileCheck -check-prefix=GFX6 %s
+; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefix=GFX8 %s
; The register coalescer introduces a verifier error which later
; results in a crash during scheduling.
@@ -7,13 +8,72 @@
declare i32 @llvm.amdgcn.workitem.id.x() #0
define amdgpu_kernel void @reg_coalescer_breaks_dead(ptr addrspace(1) nocapture readonly %arg, i32 %arg1, i32 %arg2, i32 %arg3, i1 %c0) #1 {
+; GFX6-LABEL: reg_coalescer_breaks_dead:
+; GFX6: ; %bb.0: ; %bb
+; GFX6-NEXT: v_mov_b32_e32 v1, 0
+; GFX6-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
+; GFX6-NEXT: v_mov_b32_e32 v2, 0
+; GFX6-NEXT: s_and_saveexec_b64 s[0:1], vcc
+; GFX6-NEXT: s_cbranch_execz .LBB0_2
+; GFX6-NEXT: ; %bb.1: ; %bb3
+; GFX6-NEXT: s_load_dword s2, s[4:5], 0xb
+; GFX6-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x9
+; GFX6-NEXT: s_waitcnt lgkmcnt(0)
+; GFX6-NEXT: s_ashr_i32 s3, s2, 31
+; GFX6-NEXT: s_lshl_b64 s[2:3], s[2:3], 3
+; GFX6-NEXT: s_add_u32 s2, s6, s2
+; GFX6-NEXT: s_addc_u32 s3, s7, s3
+; GFX6-NEXT: s_load_dwordx2 s[2:3], s[2:3], 0x0
+; GFX6-NEXT: s_waitcnt lgkmcnt(0)
+; GFX6-NEXT: v_mov_b32_e32 v1, s2
+; GFX6-NEXT: v_mov_b32_e32 v2, s3
+; GFX6-NEXT: .LBB0_2: ; %bb4
+; GFX6-NEXT: s_or_b64 exec, exec, s[0:1]
+; GFX6-NEXT: s_load_dword s0, s[4:5], 0xe
+; GFX6-NEXT: s_waitcnt lgkmcnt(0)
+; GFX6-NEXT: s_bitcmp0_b32 s0, 0
+; GFX6-NEXT: s_cbranch_scc1 .LBB0_4
+; GFX6-NEXT: ; %bb.3: ; %bb15
+; GFX6-NEXT: s_mov_b32 m0, -1
+; GFX6-NEXT: ds_write_b64 v0, v[1:2]
+; GFX6-NEXT: .LBB0_4: ; %bb16
+;
+; GFX8-LABEL: reg_coalescer_breaks_dead:
+; GFX8: ; %bb.0: ; %bb
+; GFX8-NEXT: v_mov_b32_e32 v1, 0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: s_and_saveexec_b64 s[0:1], vcc
+; GFX8-NEXT: s_cbranch_execz .LBB0_2
+; GFX8-NEXT: ; %bb.1: ; %bb3
+; GFX8-NEXT: s_load_dword s2, s[4:5], 0x2c
+; GFX8-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x24
+; GFX8-NEXT: s_waitcnt lgkmcnt(0)
+; GFX8-NEXT: s_ashr_i32 s3, s2, 31
+; GFX8-NEXT: s_lshl_b64 s[2:3], s[2:3], 3
+; GFX8-NEXT: s_add_u32 s2, s6, s2
+; GFX8-NEXT: s_addc_u32 s3, s7, s3
+; GFX8-NEXT: s_load_dwordx2 s[2:3], s[2:3], 0x0
+; GFX8-NEXT: s_waitcnt lgkmcnt(0)
+; GFX8-NEXT: v_mov_b32_e32 v1, s2
+; GFX8-NEXT: v_mov_b32_e32 v2, s3
+; GFX8-NEXT: .LBB0_2: ; %bb4
+; GFX8-NEXT: s_or_b64 exec, exec, s[0:1]
+; GFX8-NEXT: s_load_dword s0, s[4:5], 0x38
+; GFX8-NEXT: s_waitcnt lgkmcnt(0)
+; GFX8-NEXT: s_bitcmp0_b32 s0, 0
+; GFX8-NEXT: s_cbranch_scc1 .LBB0_4
+; GFX8-NEXT: ; %bb.3: ; %bb15
+; GFX8-NEXT: s_mov_b32 m0, -1
+; GFX8-NEXT: ds_write_b64 v0, v[1:2]
+; GFX8-NEXT: .LBB0_4: ; %bb16
bb:
%id.x = call i32 @llvm.amdgcn.workitem.id.x()
%cmp0 = icmp eq i32 %id.x, 0
br i1 %cmp0, label %bb3, label %bb4
bb3: ; preds = %bb
- %tmp = ashr exact i32 undef, 8
+ %tmp = ashr exact i32 poison, 8
br label %bb6
bb4: ; preds = %bb6, %bb
@@ -28,7 +88,7 @@ bb6: ; preds = %bb6, %bb3
%tmp11 = getelementptr inbounds <2 x i32>, ptr addrspace(1) %arg, i64 %tmp10
%tmp12 = load <2 x i32>, ptr addrspace(1) %tmp11, align 8
%tmp13 = add <2 x i32> %tmp12, %tmp7
- %tmp14 = icmp slt i32 undef, %arg2
+ %tmp14 = icmp slt i32 poison, %arg2
br i1 %tmp14, label %bb6, label %bb4
bb15: ; preds = %bb4
|
@llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) ChangesThis wasn't checking anything. Also remove undef uses. Full diff: https://github.com/llvm/llvm-project/pull/131259.diff 1 Files Affected:
diff --git a/llvm/test/CodeGen/AMDGPU/reg-coalescer-sched-crash.ll b/llvm/test/CodeGen/AMDGPU/reg-coalescer-sched-crash.ll
index 51072c36dadd2..a3b3831f5b954 100644
--- a/llvm/test/CodeGen/AMDGPU/reg-coalescer-sched-crash.ll
+++ b/llvm/test/CodeGen/AMDGPU/reg-coalescer-sched-crash.ll
@@ -1,5 +1,6 @@
-; RUN: llc -mtriple=amdgcn -verify-machineinstrs -o /dev/null < %s
-; RUN: llc -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs -o /dev/null < %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=amdgcn -mcpu=tahiti < %s | FileCheck -check-prefix=GFX6 %s
+; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefix=GFX8 %s
; The register coalescer introduces a verifier error which later
; results in a crash during scheduling.
@@ -7,13 +8,72 @@
declare i32 @llvm.amdgcn.workitem.id.x() #0
define amdgpu_kernel void @reg_coalescer_breaks_dead(ptr addrspace(1) nocapture readonly %arg, i32 %arg1, i32 %arg2, i32 %arg3, i1 %c0) #1 {
+; GFX6-LABEL: reg_coalescer_breaks_dead:
+; GFX6: ; %bb.0: ; %bb
+; GFX6-NEXT: v_mov_b32_e32 v1, 0
+; GFX6-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
+; GFX6-NEXT: v_mov_b32_e32 v2, 0
+; GFX6-NEXT: s_and_saveexec_b64 s[0:1], vcc
+; GFX6-NEXT: s_cbranch_execz .LBB0_2
+; GFX6-NEXT: ; %bb.1: ; %bb3
+; GFX6-NEXT: s_load_dword s2, s[4:5], 0xb
+; GFX6-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x9
+; GFX6-NEXT: s_waitcnt lgkmcnt(0)
+; GFX6-NEXT: s_ashr_i32 s3, s2, 31
+; GFX6-NEXT: s_lshl_b64 s[2:3], s[2:3], 3
+; GFX6-NEXT: s_add_u32 s2, s6, s2
+; GFX6-NEXT: s_addc_u32 s3, s7, s3
+; GFX6-NEXT: s_load_dwordx2 s[2:3], s[2:3], 0x0
+; GFX6-NEXT: s_waitcnt lgkmcnt(0)
+; GFX6-NEXT: v_mov_b32_e32 v1, s2
+; GFX6-NEXT: v_mov_b32_e32 v2, s3
+; GFX6-NEXT: .LBB0_2: ; %bb4
+; GFX6-NEXT: s_or_b64 exec, exec, s[0:1]
+; GFX6-NEXT: s_load_dword s0, s[4:5], 0xe
+; GFX6-NEXT: s_waitcnt lgkmcnt(0)
+; GFX6-NEXT: s_bitcmp0_b32 s0, 0
+; GFX6-NEXT: s_cbranch_scc1 .LBB0_4
+; GFX6-NEXT: ; %bb.3: ; %bb15
+; GFX6-NEXT: s_mov_b32 m0, -1
+; GFX6-NEXT: ds_write_b64 v0, v[1:2]
+; GFX6-NEXT: .LBB0_4: ; %bb16
+;
+; GFX8-LABEL: reg_coalescer_breaks_dead:
+; GFX8: ; %bb.0: ; %bb
+; GFX8-NEXT: v_mov_b32_e32 v1, 0
+; GFX8-NEXT: v_cmp_eq_u32_e32 vcc, 0, v0
+; GFX8-NEXT: v_mov_b32_e32 v2, 0
+; GFX8-NEXT: s_and_saveexec_b64 s[0:1], vcc
+; GFX8-NEXT: s_cbranch_execz .LBB0_2
+; GFX8-NEXT: ; %bb.1: ; %bb3
+; GFX8-NEXT: s_load_dword s2, s[4:5], 0x2c
+; GFX8-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x24
+; GFX8-NEXT: s_waitcnt lgkmcnt(0)
+; GFX8-NEXT: s_ashr_i32 s3, s2, 31
+; GFX8-NEXT: s_lshl_b64 s[2:3], s[2:3], 3
+; GFX8-NEXT: s_add_u32 s2, s6, s2
+; GFX8-NEXT: s_addc_u32 s3, s7, s3
+; GFX8-NEXT: s_load_dwordx2 s[2:3], s[2:3], 0x0
+; GFX8-NEXT: s_waitcnt lgkmcnt(0)
+; GFX8-NEXT: v_mov_b32_e32 v1, s2
+; GFX8-NEXT: v_mov_b32_e32 v2, s3
+; GFX8-NEXT: .LBB0_2: ; %bb4
+; GFX8-NEXT: s_or_b64 exec, exec, s[0:1]
+; GFX8-NEXT: s_load_dword s0, s[4:5], 0x38
+; GFX8-NEXT: s_waitcnt lgkmcnt(0)
+; GFX8-NEXT: s_bitcmp0_b32 s0, 0
+; GFX8-NEXT: s_cbranch_scc1 .LBB0_4
+; GFX8-NEXT: ; %bb.3: ; %bb15
+; GFX8-NEXT: s_mov_b32 m0, -1
+; GFX8-NEXT: ds_write_b64 v0, v[1:2]
+; GFX8-NEXT: .LBB0_4: ; %bb16
bb:
%id.x = call i32 @llvm.amdgcn.workitem.id.x()
%cmp0 = icmp eq i32 %id.x, 0
br i1 %cmp0, label %bb3, label %bb4
bb3: ; preds = %bb
- %tmp = ashr exact i32 undef, 8
+ %tmp = ashr exact i32 poison, 8
br label %bb6
bb4: ; preds = %bb6, %bb
@@ -28,7 +88,7 @@ bb6: ; preds = %bb6, %bb3
%tmp11 = getelementptr inbounds <2 x i32>, ptr addrspace(1) %arg, i64 %tmp10
%tmp12 = load <2 x i32>, ptr addrspace(1) %tmp11, align 8
%tmp13 = add <2 x i32> %tmp12, %tmp7
- %tmp14 = icmp slt i32 undef, %arg2
+ %tmp14 = icmp slt i32 poison, %arg2
br i1 %tmp14, label %bb6, label %bb4
bb15: ; preds = %bb4
|
shiltian
approved these changes
Mar 14, 2025
054d0f3
to
810371b
Compare
ab94652
to
494add8
Compare
This was referenced Mar 14, 2025
810371b
to
d527e6f
Compare
494add8
to
1907a9f
Compare
d527e6f
to
69dfaeb
Compare
Base automatically changed from
users/arsenm/amdgpu/generate-checks-in-test-swdev282079
to
main
March 14, 2025 09:01
This wasn't checking anything. Also remove undef uses.
1907a9f
to
71c8ed8
Compare
This was referenced Mar 14, 2025
frederik-h
pushed a commit
to frederik-h/llvm-project
that referenced
this pull request
Mar 18, 2025
…m#131259) This wasn't checking anything. Also remove undef uses.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This wasn't checking anything. Also remove undef uses.