From 45403e5052df4fda42098dac80554e7063ba0c12 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 6 Mar 2005 22:06:22 +0000 Subject: [PATCH] implement Transforms/LoopStrengthReduce/invariant_value_first_arg.ll llvm-svn: 20501 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 7ba4b810955e..d2cef4bc0b86 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())) -- GitLab