This is an archive of the discontinued LLVM Phabricator instance.

[X86] Avoid clobbering ESP/RSP in the epilogue.
ClosedPublic

Authored by goffrie on Jan 11 2019, 12:06 PM.

Details

Summary

In r345197 ESP and RSP were added to GR32_TC/GR64_TC, allowing them to
be used for tail calls, but this also caused findDeadCallerSavedReg to
think they were acceptable targets for clobbering. Filter them out.

Fixes PR40289.

Diff Detail

Event Timeline

goffrie created this revision.Jan 11 2019, 12:06 PM
rnk accepted this revision.Jan 14 2019, 1:41 PM

Thanks for the report and patch! Looks good. Do you need someone to commit this?

test/CodeGen/X86/pr40289-64bit.ll
6

popq %rsp, hilarious. XD

This revision is now accepted and ready to land.Jan 14 2019, 1:41 PM

I don't have commit access, so if you could commit it for me, I'd appreciate it!

This revision was automatically updated to reflect the committed changes.