[all-commits] [llvm/llvm-project] 5106b2: [AArch64] Treat the icmp in icmp(and(..), 0) as free
David Green via All-commits
all-commits at lists.llvm.org
Sat Jul 1 14:00:07 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5106b221c81a4d87d409379d06eb9d2a678e7b3d
https://github.com/llvm/llvm-project/commit/5106b221c81a4d87d409379d06eb9d2a678e7b3d
Author: David Green <david.green at arm.com>
Date: 2023-07-01 (Sat, 01 Jul 2023)
Changed paths:
M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
M llvm/test/Analysis/CostModel/AArch64/cmp.ll
Log Message:
-----------
[AArch64] Treat the icmp in icmp(and(..), 0) as free
As in https://godbolt.org/z/4dafd9Geq, the icmp from an And may use an Ands to
set flags, meaning the icmp is free.
This could also be done for add/sub, but those patterns often happen in the
induction variable of a loop, making them quite performance sensitive.
Differential Revision: https://reviews.llvm.org/D153611
More information about the All-commits
mailing list