In MipsDelaySlotFiller, when replacing old call-branch with the compact branch
instruction, an assertion is caused by erasing the old call with unhandled CSInfo.
The problem was reported in Bug 48695.
This patch fixes it, by moving call site info from the old call instruction to its replace.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Patch fixes the reported bug; added test cases produces a crash before patch is applied. LGTM with minor nit.
llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp | ||
---|---|---|
568–572 | Do you want to use ToErase->eraseFromParent(); here? |
Comment Actions
This fixes 32r6{,el}_defconfig and does not regress any of my other MIPS kernel builds.
Comment Actions
Addressed comments:
- Use shouldUpdateCallSiteInfo() predicate
- Use ToErase->eraseFromParent()
- Reduce function attributes in test
@nickdesaulniers @djtodoro I agree with your suggestions.
@atanasyan @nathanchance Thank you all for your comments!
Should we use the shouldUpdateCallSiteInfo() predicate instead?