[llvm] [AMDGPU] si-peephole-sdwa: Fix cndmask vcc use for wave32 (PR #139541)

Frederik Harwath via llvm-commits llvm-commits at lists.llvm.org
Mon May 12 05:51:20 PDT 2025


================
@@ -0,0 +1,40 @@
+; RUN: llc %s -march=amdgcn -mcpu=gfx1030 -o - 2>&1 | FileCheck %s
+
+; In this test, V_CNDMASK_B32_e64 gets converted to V_CNDMASK_B32_e32,
+; but the expected conversion to SDWA does not occur.  This led to a
+; compilation error, because the use of $vcc in the resulting
+; instruction must be fixed to $vcc_lo for wave32 which only happened
+; after the full conversion to SDWA.
+
+
+; CHECK-NOT: {{.*}}V_CNDMASK_B32_e32{{.*}}$vcc
+; CHECK-NOT: {{.*}}Bad machine code: Virtual register defs don't dominate all uses
----------------
frederik-h wrote:

I don't think they are useless. They serve as documentation - perhaps a comment would be just as good for this purpose - and they can improve the error message that you will see in case of a regression.

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


More information about the llvm-commits mailing list