aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-21 23:47:43 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-21 23:47:43 +0000
commita1aa8db51715bdd21770fbe4f7d7abf2c5d28829 (patch)
tree66808a47bb42d9d0c9beb5cb948e4200506c7977 /lib
parent4586d257abf13b57d115d6bac9fb38ddc811acaf (diff)
downloadexternal_llvm-a1aa8db51715bdd21770fbe4f7d7abf2c5d28829.zip
external_llvm-a1aa8db51715bdd21770fbe4f7d7abf2c5d28829.tar.gz
external_llvm-a1aa8db51715bdd21770fbe4f7d7abf2c5d28829.tar.bz2
Calls don't really change the stack pointer.
Even if a call instruction has %SP<imp-def> operands, it doesn't change the value of the stack pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMBaseInstrInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp
index 8f0170c..88eb67f 100644
--- a/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -1400,7 +1400,8 @@ bool ARMBaseInstrInfo::isSchedulingBoundary(const MachineInstr *MI,
// saves compile time, because it doesn't require every single
// stack slot reference to depend on the instruction that does the
// modification.
- if (MI->definesRegister(ARM::SP))
+ // Calls don't actually change the stack pointer, even if they have imp-defs.
+ if (!MI->isCall() && MI->definesRegister(ARM::SP))
return true;
return false;