summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit28c000b2343396a0358c1fcdd727bdebfa5b0754 (patch)
tree71d86c8b749942b793ad6e891c80efd21c34749d /llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
parenta6f86fc6fa98a4b6386f3d9cbe756be0556709cb (diff)
downloadbcm5719-llvm-28c000b2343396a0358c1fcdd727bdebfa5b0754.tar.gz
bcm5719-llvm-28c000b2343396a0358c1fcdd727bdebfa5b0754.zip
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. llvm-svn: 168248
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfoImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetInstrInfoImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
index 4439192fe2f..433f2ea0618 100644
--- a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud