[llvm] [AArch64] Fold swapped sub/SUBS conditions (PR #121412)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 10:20:08 PST 2025
================
@@ -24854,6 +24854,30 @@ static SDValue performCSELCombine(SDNode *N,
if (SDValue Folded = foldCSELofCTTZ(N, DAG))
return Folded;
+ // CSEL a, b, cc, SUBS(x, y) -> CSEL a, b, swapped(cc), SUBS(y, x)
+ // if SUB(y, x) already exists and we can produce a swapped predicate for cc.
----------------
david-arm wrote:
nit: I think this should read `if SUBS(y,x) already ...`
https://github.com/llvm/llvm-project/pull/121412
More information about the llvm-commits
mailing list