[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Aug 4 12:26:30 PDT 2005
Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.33 -> 1.34
---
Log message:
Fix a case that caused this to crash on 178.galgel
---
Diffs of the changes: (+6 -0)
LoopStrengthReduce.cpp | 6 ++++++
1 files changed, 6 insertions(+)
Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.33 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.34
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.33 Thu Aug 4 14:08:16 2005
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Thu Aug 4 14:26:19 2005
@@ -415,6 +415,12 @@
return GetImmediateValues(SARE->getStart(), isAddress, L);
}
+ if (!Val->isLoopInvariant(L)) {
+ // If this is a loop-variant expression, it must stay in the immediate
+ // field of the expression.
+ return Val;
+ }
+
return SCEVUnknown::getIntegerSCEV(0, Val->getType());
}
More information about the llvm-commits
mailing list