[llvm] [AArch64] Eliminate redundant setcc on vector comparison results (PR #171431)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 26 11:26:14 PST 2025
================
@@ -4746,6 +4746,19 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
}
}
+ // setcc X, 0, setlt --> X (when X is all sign bits)
+ //
+ // When we know that X has 0 or -1 in each lane, this comparison will produce
+ // X. This is only true when boolean contents are represented via 0s and -1s.
+ if (OpVT.isVector() && VT == OpVT &&
----------------
DaKnig wrote:
why only when `isVector`?
https://github.com/llvm/llvm-project/pull/171431
More information about the llvm-commits
mailing list