projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7db543f
)
Fix a case that caused this to crash on 178.galgel
author
Chris Lattner
<sabre@nondot.org>
Thu, 4 Aug 2005 19:26:19 +0000
(19:26 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 4 Aug 2005 19:26:19 +0000
(19:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22653
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 7b743e230e839929ef43d694f9fbbc92699d86c3..dfe72c11fcd9412f1f2628b3c8c0e50b786de336 100644
(file)
--- a/
lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/
lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@
-415,6
+415,12
@@
static SCEVHandle GetImmediateValues(SCEVHandle Val, bool isAddress, Loop *L) {
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());
}