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

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 06:51:11 PDT 2025


================
@@ -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
----------------
shiltian wrote:

Yeah because the pass does seem to commute it first (maybe for better potential opportunities after commute?).

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


More information about the llvm-commits mailing list