[llvm] [WebAssembly] Fix missed optimization in 50142 (PR #144741)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 19 10:03:35 PDT 2025


================
@@ -3248,6 +3248,37 @@ static SDValue performSETCCCombine(SDNode *N,
   ISD::CondCode Cond = cast<CondCodeSDNode>(N->getOperand(2))->get();
   SDLoc DL(N);
   EVT VT = N->getValueType(0);
+  //  N           LHS     LhsL        LhsLL    LhsLR   InnerCond RHS Cond
+  // setcc (iN (bitcast (setcc vNi1 (vNiY X), <vNiY 0>, eq)),     0, eq
+  // => all_true (vNi1 X)
+  if (DCI.isBeforeLegalize() && VT.isScalarInteger() && (Cond == ISD::SETEQ) &&
----------------
badumbatish wrote:

Ah I see, thank you for the refactor! i'll base this pr on top of yours now

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


More information about the llvm-commits mailing list