[llvm] [TTI] Include scalarization overhead for icmp/fcmp result (PR #206697)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 21:46:52 PDT 2026


lukel97 wrote:

> The cmp generic scalarization costs expansion looks right now, but I'm not confident in some of the targets costs - you might need to do some analysis or reach out to target experts to help yak shave - "fixing" costs like this can have some unexpected consequences if we have targets reliant on the old bd costs

Yeah the blast radius is unfortunately quite large, agree it would be good to get some other backend reviewers to take a look. For the costs that are affected, they're the scalarization costs which are already expensive, so making them more expensive shouldn't lead to any worse vectorization decisions. 

AFAIK the current behaviour of not including the insert cost is an oversight from the initial implementation of the cost all the way back in afae78edabfdbe187c5f4d6d41bfe17003196b87, not an intentional decision. 

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


More information about the llvm-commits mailing list