[llvm-branch-commits] [llvm-branch] r114482 - /llvm/branches/ggreif/arm-peephole/lib/Target/ARM/ARMBaseInstrInfo.cpp

Gabor Greif ggreif at gmail.com
Tue Sep 21 14:13:59 PDT 2010


Author: ggreif
Date: Tue Sep 21 16:13:59 2010
New Revision: 114482

URL: http://llvm.org/viewvc/llvm-project?rev=114482&view=rev
Log:
we must not fall off the end of the BB

Modified:
    llvm/branches/ggreif/arm-peephole/lib/Target/ARM/ARMBaseInstrInfo.cpp

Modified: llvm/branches/ggreif/arm-peephole/lib/Target/ARM/ARMBaseInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/arm-peephole/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=114482&r1=114481&r2=114482&view=diff
==============================================================================
--- llvm/branches/ggreif/arm-peephole/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/branches/ggreif/arm-peephole/lib/Target/ARM/ARMBaseInstrInfo.cpp Tue Sep 21 16:13:59 2010
@@ -1410,6 +1410,7 @@
       // walk down
       const MachineInstr &Copy = *MI;
       MachineBasicBlock::iterator a(next(MachineBasicBlock::iterator(MI)));
+      if (a == MI->getParent()->end()) return false;
       MI = a;
       return isSuitableForMask(MI, Copy.getOperand(0).getReg(),
                                CmpMask, CommonUse);





More information about the llvm-branch-commits mailing list