[llvm] [TTI] Check type legalization of both src and result for fpto{u|s}i.sat. (PR #147657)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 9 23:09:51 PDT 2025


davemgreen wrote:

> This fixes the case where one or both of the types is invalid. But don't we need to take the maximum of the two `LT.second` values when both types are valid but one them splits more than the other?

Perhaps (in a followup) we could say that custom lowering for fptosi.sat isn't meaningful enough (only based on RetTy) to be useful and should always use the fallback costs (line 2758-2783). The target can override it based on the extra information it knows.

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


More information about the llvm-commits mailing list