[llvm] [SelectionDAG] Simplify vselect true, T, F -> T (PR #100992)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 04:41:15 PDT 2024


================
@@ -3260,26 +3260,10 @@ static SDValue extractBooleanFlip(SDValue V, SelectionDAG &DAG,
   if (V.getOpcode() != ISD::XOR)
     return SDValue();
 
-  ConstantSDNode *Const = isConstOrConstSplat(V.getOperand(1), false);
-  if (!Const)
+  if (!isConstOrConstSplat(V.getOperand(1), false))
----------------
lukel97 wrote:

For what it's worth there's no test difference with this check removed, but I stuck it back in anyway just to avoid changing the Force == true codepath

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


More information about the llvm-commits mailing list