This patch promotes result integer type of FP_TO_XINT in expanding. Crash in conversion from ppc_fp128 to i1 will be fixed.
Details
- Reviewers
steven.zhang nemanjai craig.topper RKSimon jsji uweigand - Group Reviewers
Restricted Project - Commits
- rGf776d8b12f0e: [Legalizer] Promote result type in expanding FP_TO_XINT
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | ||
---|---|---|
916 | If the type isn't legal, it would have already been handled by LegalizeIntegerTypes.cpp since results are checked for legality first. | |
949–951 | This won't execute findConversionLibcall in a release build. assert is a macro, nothing passed to it will be evaluated if asserts aren't enabled. |
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | ||
---|---|---|
916 | I think Conversion is to vague here. Perhaps findFPToIntLibcall()? |
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | ||
---|---|---|
1911 | Also add the assertion for NVT to make it more safe ? assert(NVT.isSimple() ...) |
LGTM, but please hold on for days to see if @craig.topper or @nemanjai have more comments.
If the type isn't legal, it would have already been handled by LegalizeIntegerTypes.cpp since results are checked for legality first.