[X86] Fix a shrink-wrapping miscompile around __chkstk
authorReid Kleckner <rnk@google.com>
Wed, 17 Feb 2016 00:17:33 +0000 (00:17 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 17 Feb 2016 00:17:33 +0000 (00:17 +0000)
commit8de35fef3d2778e7ff6359d237973628c04f279f
tree75fd914466ef17fb627d7d3647f97e69408fe378
parentb83bedd8c28a8b0c45da05cf9709cdebdd98a2fc
[X86] Fix a shrink-wrapping miscompile around __chkstk

__chkstk clobbers EAX. If EAX is live across the prologue, then we have
to take extra steps to save it. We already had code to do this if EAX
was a register parameter. This change adapts it to work when shrink
wrapping is used.

llvm-svn: 261039
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/test/CodeGen/X86/shrink-wrap-chkstk.ll