[llvm] [WebAssembly] Fix missed optimization in 50142 (PR #144741)
Sam Parker via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 01:28:32 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) &&
----------------
sparker-arm wrote:
Taking advantage of the code below sounds good to me, there looks to be too much code duplication otherwise.
https://github.com/llvm/llvm-project/pull/144741
More information about the llvm-commits
mailing list