[llvm] [WebAssembly] Fix missed optimization in 50142 (PR #144741)
Sam Parker via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 04:19:03 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:
I found it somewhat painful to read the existing code, for which I have now suggested a refactor in #144875 144875.
https://github.com/llvm/llvm-project/pull/144741
More information about the llvm-commits
mailing list