diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2011-10-05 02:21:58 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2011-10-05 02:21:58 +0000 |
commit | 8e532eb92f99fc6eca98a1d1c435902cf824d0dd (patch) | |
tree | 61e414b4a9d3c8ef962c3ea1aa59f58a18c00f57 /llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp | |
parent | 0d7dfc0b1f68a4695963c87628fceb95562c052a (diff) | |
download | bcm5719-llvm-8e532eb92f99fc6eca98a1d1c435902cf824d0dd.tar.gz bcm5719-llvm-8e532eb92f99fc6eca98a1d1c435902cf824d0dd.zip |
Do not examine variadic or implicit operands if instruction is a return (jr).
llvm-svn: 141157
Diffstat (limited to 'llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp index 91a80a71aa3..bbcdb1ee807 100644 --- a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp +++ b/llvm/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); |