[llvm] [AArch64] Consider negated powers of 2 when calculating throughput cost (PR #143013)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 9 06:18:46 PDT 2025


AZero13 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.

Addressed!

https://github.com/llvm/llvm-project/pull/143013


More information about the llvm-commits mailing list