summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-06 22:06:22 +0000
committerChris Lattner <sabre@nondot.org>2005-03-06 22:06:22 +0000
commit45403e5052df4fda42098dac80554e7063ba0c12 (patch)
treea8c95475cd4fb870331095a22d3157439706061f /llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
parent656a6e37e19ceda0d258e37af6e47c751c9bc879 (diff)
downloadbcm5719-llvm-45403e5052df4fda42098dac80554e7063ba0c12.tar.gz
bcm5719-llvm-45403e5052df4fda42098dac80554e7063ba0c12.zip
implement Transforms/LoopStrengthReduce/invariant_value_first_arg.ll
llvm-svn: 20501
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 7ba4b810955..d2cef4bc0b8 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<Constant>(operand)) {
+ } else if (isa<Constant>(operand) || isa<Argument>(operand)) {
pre_op_vector.push_back(operand);
} else if (Instruction *inst = dyn_cast<Instruction>(operand)) {
if (!DS->dominates(inst, Preheader->getTerminator()))
OpenPOWER on IntegriCloud