[llvm] [AArch64] Consider negated powers of 2 when calculating throughput cost (PR #143013)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 8 10:26:42 PDT 2025
davemgreen wrote:
> Not really
>
> Because the asr is folded into it most of the time
I was looking into https://llvm.godbolt.org/z/xTKTddj73. The vector versions will not generally be able to fold the sub into the other instructions. For the scalar versions, sub+asr is usually a more expensive instruction than a single sub, although exact throughput costs become difficult to be precise about.
https://github.com/llvm/llvm-project/pull/143013
More information about the llvm-commits
mailing list