aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInstrInfoImpl.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-11-17 03:35:11 +0000
committerAndrew Trick <atrick@apple.com>2012-11-17 03:35:11 +0000
commite1f663933a59a04c6c01f12e140088cf2370b1f4 (patch)
tree4d812e7f409fd49d1bc700650e2e1cb55889dc3e /lib/CodeGen/TargetInstrInfoImpl.cpp
parentc37f502d48f7eb34099bb60ece63400657fb180e (diff)
Broaden isSchedulingBoundary to check aliases of SP.
On PPC the stack pointer is X1, but ADJCALLSTACK writes R1. Fixes PR14315: Register regmask dependency problem with misched. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInstrInfoImpl.cpp')
-rw-r--r--lib/CodeGen/TargetInstrInfoImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/TargetInstrInfoImpl.cpp b/lib/CodeGen/TargetInstrInfoImpl.cpp
index 4439192fe2..433f2ea061 100644
--- a/lib/CodeGen/TargetInstrInfoImpl.cpp
+++ b/lib/CodeGen/TargetInstrInfoImpl.cpp
@@ -472,7 +472,8 @@ bool TargetInstrInfoImpl::isSchedulingBoundary(const MachineInstr *MI,
// stack slot reference to depend on the instruction that does the
// modification.
const TargetLowering &TLI = *MF.getTarget().getTargetLowering();
- if (MI->definesRegister(TLI.getStackPointerRegisterToSaveRestore()))
+ const TargetRegisterInfo *TRI = MF.getTarget().getRegisterInfo();
+ if (MI->modifiesRegister(TLI.getStackPointerRegisterToSaveRestore(), TRI))
return true;
return false;