diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 7ba4b810955e58e5f34c1bf239770e2c4c2b7d0b..d2cef4bc0b868df69b5ef2101c919eb2b5f86460 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -154,7 +154,7 @@ void LoopStrengthReduce::strengthReduceGEP(GetElementPtrInst *GEPI, Loop *L, inc_op_vector.push_back(ConstantInt::get(Ty, 1)); indvar = op; break; - } else if (isa(operand)) { + } else if (isa(operand) || isa(operand)) { pre_op_vector.push_back(operand); } else if (Instruction *inst = dyn_cast(operand)) { if (!DS->dominates(inst, Preheader->getTerminator()))