aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-10-31 04:00:23 +0000
committerBill Wendling <isanbard@gmail.com>2008-10-31 04:00:23 +0000
commitf6a9988ceab0ca660fa4f4e89d8d683f487118eb (patch)
tree40d810941b73fa68a95150cae99235cecb5974e0 /lib/CodeGen/PrologEpilogInserter.cpp
parent0656466734f44ac2fc0132322700b67a18d220c2 (diff)
downloadexternal_llvm-f6a9988ceab0ca660fa4f4e89d8d683f487118eb.zip
external_llvm-f6a9988ceab0ca660fa4f4e89d8d683f487118eb.tar.gz
external_llvm-f6a9988ceab0ca660fa4f4e89d8d683f487118eb.tar.bz2
Don't skip over all "terminator" instructions when determining where to put the
callee-saved restore code. It could skip over conditional jumps accidentally. Instead, just skip the "return" instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp
index d3b0b11..2469c8e 100644
--- a/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/lib/CodeGen/PrologEpilogInserter.cpp
@@ -273,10 +273,10 @@ void PEI::saveCalleeSavedRegisters(MachineFunction &Fn) {
MBB = FI;
I = MBB->end(); --I;
- // Skip over all terminator instructions, which are part of the return
+ // Skip over all "return" instructions, which are part of the return
// sequence.
MachineBasicBlock::iterator I2 = I;
- while (I2 != MBB->begin() && (--I2)->getDesc().isTerminator())
+ while (I2 != MBB->begin() && (--I2)->getDesc().isReturn())
I = I2;
bool AtStart = I == MBB->begin();