[llvm] [ARM] Replace ABS and tABS machine nodes with custom lowering (PR #156717)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 00:18:13 PDT 2025


davemgreen wrote:

> Is 2 not accurate since it is just cmp+cmov?

Yeah It depends on how much a cmp costs. The BasicTTI seems to use ICmp+Select+Sub costs, even if the default expansion is via asr+xor+sub. The cost of i64 seems too low, and the costsize costs of the others you could argue should be higher than 2. 

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


More information about the llvm-commits mailing list