OSDN Git Service

[X86] Make sure it is safe to clobber EFLAGS, if need be, when choosing
authorQuentin Colombet <qcolombet@apple.com>
Tue, 26 Apr 2016 23:44:14 +0000 (23:44 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Tue, 26 Apr 2016 23:44:14 +0000 (23:44 +0000)
commitba357d2f7baaf5482d1ebb78463642b53feed773
treea0fca210d0f953f1274238710d451195249408ff
parentc943cfacc2b44770f70c1b67ee64ef88e73a065e
[X86] Make sure it is safe to clobber EFLAGS, if need be, when choosing
the prologue.

Do not use basic blocks that have EFLAGS live-in as prologue if we need
to realign the stack. Realigning the stack uses AND instruction and this
clobbers EFLAGS.

An other alternative would have been to save and restore EFLAGS around
the stack realignment code, but this is likely inefficient.

Fixes PR27531.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267634 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
test/CodeGen/X86/i686-win-shrink-wrapping.ll [new file with mode: 0644]