[llvm] [AMDGPU][SDAG] Support source modifiers as integer on select (PR #147325)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 05:20:55 PDT 2025


================
@@ -4830,6 +4830,62 @@ AMDGPUTargetLowering::foldFreeOpFromSelect(TargetLowering::DAGCombinerInfo &DCI,
   return SDValue();
 }
 
+static EVT getFloatVT(EVT VT) {
+  return VT.isVector() ? MVT::getVectorVT(
+                             MVT::getFloatingPointVT(VT.getScalarSizeInBits()),
+                             VT.getVectorNumElements())
+                       : MVT::getFloatingPointVT(VT.getFixedSizeInBits());
+}
+
+static SDValue getBitwiseToSrcModifierOp(SDValue N,
+                                         TargetLowering::DAGCombinerInfo &DCI) {
+
+  unsigned Opc = N.getNode()->getOpcode();
+  if (Opc != ISD::AND && Opc != ISD::XOR && Opc != ISD::AND)
----------------
arsenm wrote:

Check for AND repeated twice, one should be OR?

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


More information about the llvm-commits mailing list