aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/Mips/MipsDelaySlotFiller.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsDelaySlotFiller.cpp b/lib/Target/Mips/MipsDelaySlotFiller.cpp
index 91a80a71aa..bbcdb1ee80 100644
--- a/lib/Target/Mips/MipsDelaySlotFiller.cpp
+++ b/lib/Target/Mips/MipsDelaySlotFiller.cpp
@@ -222,8 +222,9 @@ void Filler::insertDefsUses(MachineBasicBlock::iterator MI,
// no instruction that can possibly be put in a delay slot can read or
// write it.
- unsigned e = MI->getDesc().isCall() ? MI->getDesc().getNumOperands() :
- MI->getNumOperands();
+ MCInstrDesc MCID = MI->getDesc();
+ unsigned e = MCID.isCall() || MCID.isReturn() ? MCID.getNumOperands() :
+ MI->getNumOperands();
for (unsigned i = 0; i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);