[llvm] [WASM] Fold bitselect with splat zero (PR #147305)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 13:57:30 PDT 2025


================
@@ -3210,6 +3213,56 @@ static SDValue performTruncateCombine(SDNode *N,
   return truncateVectorWithNARROW(OutVT, In, DL, DAG);
 }
 
+static SDValue performVSelectCombine(SDNode *N,
+                                     TargetLowering::DAGCombinerInfo &DCI) {
+  // In the tablegen.td, vselect A B C -> bitselect B C A
+
+  // SCENARIO 1
+  // vselect Y, <0>, X
----------------
badumbatish wrote:

i think with the below comment, doing things in DAGCombiner benefits from this 

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


More information about the llvm-commits mailing list