OSDN Git Service

[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)
commitf8cab7eaae920a6ee97835ea9936c9d8c215ffef
treec12cad9cd1b7e9370b054a0d9c7b0d0be8a2eec5
parent20fb2a1a136ceccfbcb0857ea389ed711bf4b712
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261039 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FrameLowering.cpp
test/CodeGen/X86/shrink-wrap-chkstk.ll