[all-commits] [llvm/llvm-project] c22364: [AArch64] Eliminate Common SUBS by Reassociating N...
Marius Kamp via All-commits
all-commits at lists.llvm.org
Tue Jan 21 01:15:23 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c22364a4324218e29512740466a2b2cb1a406d8b
https://github.com/llvm/llvm-project/commit/c22364a4324218e29512740466a2b2cb1a406d8b
Author: Marius Kamp <msk at posteo.org>
Date: 2025-01-21 (Tue, 21 Jan 2025)
Changed paths:
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/test/CodeGen/AArch64/csel-cmp-cse.ll
Log Message:
-----------
[AArch64] Eliminate Common SUBS by Reassociating Non-Constants (#123344)
Commit 1eed46960c217f9480865702f06fb730c7521e61 added logic to
reassociate a (add (add x y) -c) operand to a CSEL instruction with a
comparison involving x and c (or a similar constant) in order to obtain
a common (SUBS x c) instruction.
This commit extends this logic to non-constants. In this way, we also
reassociate a (sub (add x y) z) operand of a CSEL instruction to
(add (sub x z) y) if the CSEL compares x and z, for example.
Alive proof: https://alive2.llvm.org/ce/z/SEVpR
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list