[llvm] select m, sub/add(X, C), X --> sub/add (X, and(C, m)) (PR #82441)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 16:07:18 PST 2024


================
@@ -11660,6 +11660,24 @@ SDValue DAGCombiner::visitSELECT(SDNode *N) {
     }
   }
 
+  // select m, sub(X, C), X --> sub (X, and(C, m))
----------------
topperc wrote:

I'm confused. Shouldn't select have a scalar condition. If the condition is a vector it should be ISD::VSELECT

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


More information about the llvm-commits mailing list