aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-26 21:46:36 +0000
committerDan Gohman <gohman@apple.com>2010-04-26 21:46:36 +0000
commit3363de75142043801f4eff32a8356bd8f463c91a (patch)
treedf1112fb89185334963f2c3c48a45a1833371126 /lib/Analysis/ScalarEvolutionExpander.cpp
parent001591a05b4db9231ec1d23b083fa181c1883972 (diff)
downloadexternal_llvm-3363de75142043801f4eff32a8356bd8f463c91a.zip
external_llvm-3363de75142043801f4eff32a8356bd8f463c91a.tar.gz
external_llvm-3363de75142043801f4eff32a8356bd8f463c91a.tar.bz2
When checking whether the special handling for an addrec increment which
doesn't dominate the header is needed, don't check whether the increment expression has computable loop evolution. While the operands of an addrec are required to be loop-invariant, they're not required to dominate any part of the loop. This fixes PR6914. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102389 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r--lib/Analysis/ScalarEvolutionExpander.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp
index b90f051..e9a634b 100644
--- a/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/lib/Analysis/ScalarEvolutionExpander.cpp
@@ -995,8 +995,7 @@ Value *SCEVExpander::expandAddRecExprLiterally(const SCEVAddRecExpr *S) {
// Strip off any non-loop-dominating component from the addrec step.
const SCEV *Step = Normalized->getStepRecurrence(SE);
const SCEV *PostLoopScale = 0;
- if (!Step->hasComputableLoopEvolution(L) &&
- !Step->dominates(L->getHeader(), SE.DT)) {
+ if (!Step->dominates(L->getHeader(), SE.DT)) {
PostLoopScale = Step;
Step = SE.getIntegerSCEV(1, Normalized->getType());
Normalized =