[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:36:23 PDT 2025
davemgreen wrote:
I might be wrong about what is going on, but yes I assumed that the backends marking those opcodes as Custom (https://github.com/llvm/llvm-project/blob/20becf373edcf9d568f8904c2b473e6b48500787/llvm/lib/Target/ARM/ARMISelLowering.cpp#L327, https://github.com/llvm/llvm-project/blob/20becf373edcf9d568f8904c2b473e6b48500787/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp#L2060, https://github.com/llvm/llvm-project/blob/20becf373edcf9d568f8904c2b473e6b48500787/llvm/lib/Target/RISCV/RISCVISelLowering.cpp#L835) makes the cost model use the isOperationCustom cost of 2 in the code you pointed to. That might not be very useful for a lot of types though (it doesn't consider the Tys[0], only RetTy), and maybe for this particular operation it isn't going to be correct enough to be useful.
https://github.com/llvm/llvm-project/pull/147657
More information about the llvm-commits
mailing list