[llvm] [AMDGPU] Add folding ISD::SELECT from vXiY into vZi32 with X * Y = Z * 32 (PR #173328)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 07:27:26 PDT 2026


================
@@ -5913,6 +5913,15 @@ class LLVM_ABI TargetLowering : public TargetLoweringBase {
     return true;
   }
 
+  // Return true if should transform:
+  //    `t0:vXiY = select i1, t1, t2`
+  // To:
+  //    `t3:vPiQ = bitcast t1`
+  //    `t4:vPiQ = bitcast t2`
+  //    `t5:vPiQ = select i1, t3, t4`
+  //    `t0:vXiY = bitcast t5`
+  virtual bool shouldCastIntVectorSelect(EVT VT) const { return false; }
----------------
arsenm wrote:

Should try really hard not to add this 

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


More information about the llvm-commits mailing list