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

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 03:52:31 PDT 2026


lukel97 wrote:

> Do you think that the real problem is that there is a cost needed for the interconnect between a i1 cmp result and the select instruction / other use, and that isn't accounted for anywhere? 

Yeah that's what this PR is trying to solve for the scalarisation case, by filling in the disconnect between a scalar i1 and a vector mask used for the select.

> The same is true for having to extend masks on architectures without predicate masks. (Like generating a v4i1 mask from a v4i16, then using as a v4i64 mask in an select instruction, something needs to account for the cost of extending the mask to a larger size).

Agreed but I think that's a separate case outside of scalarization right? That's for when the vector type gets promoted to another vector. 

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


More information about the llvm-commits mailing list