Improve ext/trunc patterns on PPC64.
[oota-llvm.git] / lib / Target / PowerPC / PPCCTRLoops.cpp
index 4671893c3e4b28a90a7a7cef2865a3d4b7773310..5234da71a8de80807e4c166175160568cc2b3deb 100644 (file)
@@ -371,6 +371,7 @@ bool
 PPCCTRLoops::isInductionOperation(const MachineInstr *MI,
                                            unsigned IVReg) const {
   return ((MI->getOpcode() == PPC::ADDI || MI->getOpcode() == PPC::ADDI8) &&
+          MI->getOperand(1).isReg() && // could be a frame index instead
           MI->getOperand(1).getReg() == IVReg);
 }