Skip to content

AMDGPU: Use generated checks in coalescer_distribute.ll #131276

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

Also replace the undef with poison.

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-backend-amdgpu

Author: Matt Arsenault (arsenm)

Changes

Also replace the undef with poison.


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

1 Files Affected:

  • (modified) llvm/test/CodeGen/AMDGPU/coalescer_distribute.ll (+25-2)
diff --git a/llvm/test/CodeGen/AMDGPU/coalescer_distribute.ll b/llvm/test/CodeGen/AMDGPU/coalescer_distribute.ll
index 8f4d10411ed73..d07cc84865bea 100644
--- a/llvm/test/CodeGen/AMDGPU/coalescer_distribute.ll
+++ b/llvm/test/CodeGen/AMDGPU/coalescer_distribute.ll
@@ -1,8 +1,31 @@
-; RUN: llc -mtriple=amdgcn-- -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 %s
+
 ; This testcase produces a situation with unused value numbers in subregister
 ; liveranges that get distributed by ConnectedVNInfoEqClasses.
 
 define amdgpu_kernel void @hoge(i1 %c0, i1 %c1, i1 %c2, i1 %c3, i1 %c4) {
+; CHECK-LABEL: hoge:
+; CHECK:       ; %bb.0: ; %bb
+; CHECK-NEXT:    s_load_dword s2, s[4:5], 0x9
+; CHECK-NEXT:    v_cmp_eq_u32_e32 vcc, 0, v0
+; CHECK-NEXT:    s_waitcnt lgkmcnt(0)
+; CHECK-NEXT:    s_bitcmp1_b32 s2, 0
+; CHECK-NEXT:    s_cselect_b64 s[0:1], -1, 0
+; CHECK-NEXT:    s_and_b64 s[4:5], s[0:1], vcc
+; CHECK-NEXT:    s_and_saveexec_b64 s[0:1], s[4:5]
+; CHECK-NEXT:    s_or_b64 exec, exec, s[0:1]
+; CHECK-NEXT:    s_bitcmp1_b32 s2, 24
+; CHECK-NEXT:    s_cselect_b64 s[0:1], -1, 0
+; CHECK-NEXT:    s_xor_b64 s[0:1], s[0:1], -1
+; CHECK-NEXT:    v_cndmask_b32_e64 v0, 0, 1, s[0:1]
+; CHECK-NEXT:    v_cmp_ne_u32_e64 s[0:1], 1, v0
+; CHECK-NEXT:  .LBB0_1: ; %bb25
+; CHECK-NEXT:    ; =>This Inner Loop Header: Depth=1
+; CHECK-NEXT:    s_and_b64 vcc, exec, s[0:1]
+; CHECK-NEXT:    s_cbranch_vccnz .LBB0_1
+; CHECK-NEXT:  ; %bb.2: ; %bb30
+; CHECK-NEXT:    s_endpgm
 bb:
   %tmp = tail call i32 @llvm.amdgcn.workitem.id.x()
   br i1 %c0, label %bb2, label %bb23
@@ -11,7 +34,7 @@ bb2:
   br i1 %c1, label %bb6, label %bb8
 
 bb6:
-  %tmp7 = or i64 undef, undef
+  %tmp7 = or i64 poison, poison
   br label %bb8
 
 bb8:

@arsenm arsenm force-pushed the users/arsenm/amdgpu/generate-checks-vector-legalizer-divergence branch from 178ebf5 to 54435ee Compare March 14, 2025 07:57
@arsenm arsenm force-pushed the users/arsenm/amdgpu/switch-coalescer_distribute-test-to-generated-checks branch from f605275 to 9616b2f Compare March 14, 2025 07:58
@arsenm arsenm force-pushed the users/arsenm/amdgpu/generate-checks-vector-legalizer-divergence branch from 54435ee to 4dd02c4 Compare March 14, 2025 09:06
@arsenm arsenm force-pushed the users/arsenm/amdgpu/switch-coalescer_distribute-test-to-generated-checks branch from 9616b2f to 22a5723 Compare March 14, 2025 09:07
Copy link
Contributor Author

arsenm commented Mar 14, 2025

Merge activity

  • Mar 14, 7:10 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Mar 14, 7:18 AM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 14, 7:21 AM EDT: A user merged this pull request with Graphite.

@arsenm arsenm force-pushed the users/arsenm/amdgpu/generate-checks-vector-legalizer-divergence branch 3 times, most recently from c45231e to cdfaaf9 Compare March 14, 2025 11:15
Base automatically changed from users/arsenm/amdgpu/generate-checks-vector-legalizer-divergence to main March 14, 2025 11:18
Also replace the undef with poison.
@arsenm arsenm force-pushed the users/arsenm/amdgpu/switch-coalescer_distribute-test-to-generated-checks branch from 22a5723 to 8d10c14 Compare March 14, 2025 11:18
@arsenm arsenm merged commit 11d35a0 into main Mar 14, 2025
6 of 9 checks passed
@arsenm arsenm deleted the users/arsenm/amdgpu/switch-coalescer_distribute-test-to-generated-checks branch March 14, 2025 11:21
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