Skip to content

[NFC][AMDGPU] Pre-commit a test case that shows wrong reverse operation is used for V_CMPX_LE_U32 #146527

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

shiltian
Copy link
Contributor

@shiltian shiltian commented Jul 1, 2025

No description provided.

Copy link
Contributor Author

shiltian commented Jul 1, 2025

@llvmbot
Copy link
Member

llvmbot commented Jul 1, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Shilei Tian (shiltian)

Changes

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

1 Files Affected:

  • (modified) llvm/test/CodeGen/AMDGPU/cmp_shrink.mir (+13)
diff --git a/llvm/test/CodeGen/AMDGPU/cmp_shrink.mir b/llvm/test/CodeGen/AMDGPU/cmp_shrink.mir
index ae3fa153f381a..296903043bceb 100644
--- a/llvm/test/CodeGen/AMDGPU/cmp_shrink.mir
+++ b/llvm/test/CodeGen/AMDGPU/cmp_shrink.mir
@@ -10,3 +10,16 @@ body:             |
     ; GCN: S_CMP_LT_I32 65, 1, implicit-def $scc
     S_CMP_GT_I32 1, 65, implicit-def $scc
 ...
+
+---
+name:             shrink_icmp
+body:             |
+  bb.0:
+    ; GCN-LABEL: name: shrink_icmp
+    ; GCN: %op0:sgpr_32 = COPY $sgpr0
+    ; GCN-NEXT: %cond:sreg_64 = V_CMPX_LE_U32_e64 5, %op0, implicit-def $exec, implicit $exec
+    ; GCN-NEXT: S_NOP 0
+    %op0:sgpr_32 = COPY $sgpr0
+    %cond:sreg_64 = V_CMPX_LE_U32_e64 %op0, 5, implicit-def $exec, implicit $exec
+    S_NOP 0
+...

@shiltian shiltian merged commit bab9d4c into main Jul 1, 2025
7 of 9 checks passed
@shiltian shiltian deleted the users/shiltian/pre-commit-test-for-wrong-v_cmpx_le_u32-reverse branch July 1, 2025 13:57
rlavaee pushed a commit to rlavaee/llvm-project that referenced this pull request Jul 1, 2025
rlavaee pushed a commit to rlavaee/llvm-project that referenced this pull request Jul 1, 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.

4 participants