[PATCH] D17643: Fix failing assertion when the X87 stackifier runs on functions containing IRETs
David Kreitzer via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 06:17:19 PST 2016
DavidKreitzer created this revision.
DavidKreitzer added reviewers: nadav, qcolombet, aaboud.
DavidKreitzer added a subscriber: llvm-commits.
handleSpecialFP is currently hitting llvm_unreachable("Unknown SpecialFP instruction!"), because the IRET opcodes are marked as "FPForm = SpecialFP" but are unsupported in handleSpecialFP.
I chose to fix this by handling all the return opcodes uniformly in handleSpecialFP, as that seemed like the most robust choice. An alternative would be to change X86InstrControl.td so that the IRETs are not marked "FPForm = SpecialFP" since interrupt handlers cannot actually return x87 values (or any other values for that matter). But that clutters X86InstrControl.td for no good reason.
The code in the new handleReturn function is virtually identical to the original return-handling code in handleSpecialFP. The only differences are in the indentation and the "MachineInstr *MI = I;" at the top.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11165 bytes
Desc: not available
More information about the llvm-commits