OSDN Git Service

[X86] Don't alter HasOpaqueSPAdjustment after we've relied on it
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 14 Jan 2016 01:20:03 +0000 (01:20 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 14 Jan 2016 01:20:03 +0000 (01:20 +0000)
commitf7cfdf8b26dee117c4ebcac4d0ef045c30e49a01
tree497af338a611f1df9998f882208e490ac5e2a3c4
parent103a36146c92d2fe0ff2f25f28e8ab2cf075b1e3
[X86] Don't alter HasOpaqueSPAdjustment after we've relied on it

We rely on HasOpaqueSPAdjustment not changing after we've calculated
things based on it.  Things like whether or not we can use 'rep;movs' to
copy bytes around, that sort of thing.  If it changes, invariants in the
backend will quietly break.  This situation arose when we had a call to
memcpy *and* a COPY of the FLAGS register where we would attempt to
reference local variables using %esi, a register that was clobbered by
the 'rep;movs'.

This fixes PR26124.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257730 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineFrameInfo.h
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/x86-repmov-copy-eflags.ll [new file with mode: 0644]