[llvm] [ARM] Switch to soft promoting half types. (PR #80440)

Harald van Dijk via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 11:11:04 PST 2024


hvdijk wrote:

> I'm nervous about making type legalization disagree with getTypeToTransformTo(). For all other cases, it does agree, and some legalization code assumes it agrees.

Note that the type legalization here is using the same type legalization that x86 and RISC-V have already been using: if `f16` is not a legal type, `TransformToType[MVT::f16]` always gets set to `MVT::f32`, yet despite that, x86 and RISC-V already use soft-promotion which transforms them to `i16`. This commit (or the previous one) does not introduce that as a new thing in LLVM, it uses what is already there. You may be right that there is code that makes assumptions that do not hold under soft-promotion, but if there is, I would expect it to show up on x86 and RISC-V as well.

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


More information about the llvm-commits mailing list