As noted in D156990, the logic in ExpandIntRes_FP_TO_SINT assumes that if the type action for the float type is TypeSoftPromoteHalf, is must have been an f16 (half). However, the meaning of that type action has been overloaded and it is used for both f16 and bf16. This patch adds an appropriate check to ensure ISD::FP16_TO_FP or ISD::BF16_TO_FP is emitted as required.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
- Rebase (all dependent patches are now committed)
- Remove TODO comments that are fixed by this patch
Comment Actions
Apologies for the noise, the previous versions had a bug in that they were checking the type of Op.getValueType after Op = GetSoftPromotedHalf(Op). The patch now correctly gets the old FP VT before doing that call. This bug was caught by existing tests (I just hadn't seen that half-convert.ll failed) so no further test changes needed.