diff options
| author | Dan Gohman <gohman@apple.com> | 2010-04-26 21:46:36 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-04-26 21:46:36 +0000 |
| commit | 58b0470592651fe50ed7721edf452a6b782439e3 (patch) | |
| tree | 8132c0e8a1881fa5bcb4d6074cc8b2f8ac727bc1 /llvm/lib/Analysis | |
| parent | 8f68b777e2c2c84ba7d492b519ead3ebf4521298 (diff) | |
| download | bcm5719-llvm-58b0470592651fe50ed7721edf452a6b782439e3.tar.gz bcm5719-llvm-58b0470592651fe50ed7721edf452a6b782439e3.zip | |
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.
llvm-svn: 102389
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/README.txt | 2 | ||||
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolutionExpander.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/README.txt b/llvm/lib/Analysis/README.txt index 88ea9f11ad7..0e96e4c950c 100644 --- a/llvm/lib/Analysis/README.txt +++ b/llvm/lib/Analysis/README.txt @@ -17,7 +17,7 @@ which is very inefficient when expanded into code. //===---------------------------------------------------------------------===// -In test/CodeGen/X86/lsr-delayed-fold.ll, +In formatValue in test/CodeGen/X86/lsr-delayed-fold.ll, ScalarEvolution is forming this expression: diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp index b90f0515a42..e9a634bdee2 100644 --- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/llvm/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 = |

