summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit6d70df0b0544d4450a8bc8c5ddcaf5412e5fe6d8 (patch)
tree876f94549a2971adaac706741e86be7c075ae59d /llvm/lib/CodeGen/PrologEpilogInserter.cpp
parenta290ded36a654db8421e84c16ba108d1daa313df (diff)
downloadbcm5719-llvm-6d70df0b0544d4450a8bc8c5ddcaf5412e5fe6d8.tar.gz
bcm5719-llvm-6d70df0b0544d4450a8bc8c5ddcaf5412e5fe6d8.zip
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. llvm-svn: 58489
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index d3b0b11c705..2469c8e000c 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud