[llvm] [AMDGPU] Switch V_CNDMASK operands to shrink it into VOP2 (PR #135162)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 10 06:49:25 PDT 2025


================
@@ -973,6 +1083,10 @@ bool SIShrinkInstructions::run(MachineFunction &MF) {
         continue;
       }
 
+      if (MI.getOpcode() == AMDGPU::V_CNDMASK_B32_e64 &&
----------------
jayfoad wrote:

I think you can... you would be looking for all cndmask instructions that use the result of the compare as their src2 operand, and then swapping their src0 and src1 operands.

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


More information about the llvm-commits mailing list