[llvm] [AArch64] Eliminate redundant setcc on vector comparison results (PR #171431)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 14 09:30:59 PST 2026
================
@@ -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 &&
----------------
RKSimon wrote:
Can OpVT.isVector() be dropped now?
https://github.com/llvm/llvm-project/pull/171431
More information about the llvm-commits
mailing list