summaryrefslogtreecommitdiff
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
commit948c8a3e3d7349c67e5d9231d9e99b2692623630 (patch)
treedf1112fb89185334963f2c3c48a45a1833371126 /lib/Analysis/ScalarEvolutionExpander.cpp
parent585c40129fdf375fe2d85dd1de6a57e716ddef43 (diff)
downloadllvm-948c8a3e3d7349c67e5d9231d9e99b2692623630.tar.gz
llvm-948c8a3e3d7349c67e5d9231d9e99b2692623630.tar.bz2
llvm-948c8a3e3d7349c67e5d9231d9e99b2692623630.tar.xz
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 b90f0515a4..e9a634bdee 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 =