diff options
| author | Dan Gohman <gohman@apple.com> | 2009-05-24 23:25:42 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-05-24 23:25:42 +0000 |
| commit | 8ca0885d69ed4c41f9df940f7da72b3adc8193e3 (patch) | |
| tree | 29e38bc746f7ad0b812233dc6db46c1d5bfe1a30 /llvm/lib/Transforms | |
| parent | ac149ee60a9443533f6415b1d72af77bbdb9a561 (diff) | |
| download | bcm5719-llvm-8ca0885d69ed4c41f9df940f7da72b3adc8193e3.tar.gz bcm5719-llvm-8ca0885d69ed4c41f9df940f7da72b3adc8193e3.zip | |
Change ScalarEvolution::getSCEVAtScope to always return the original value
in the case where a loop exit value cannot be computed, instead of only in
some cases while using SCEVCouldNotCompute in others. This simplifies
getSCEVAtScope's callers.
llvm-svn: 72375
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 7300bf47fe7..ca7aa7bd30d 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -275,10 +275,8 @@ void IndVarSimplify::RewriteLoopExitValues(Loop *L, // Okay, this instruction has a user outside of the current loop // and varies predictably *inside* the loop. Evaluate the value it // contains when the loop exits, if possible. - SCEVHandle SH = SE->getSCEV(Inst); - SCEVHandle ExitValue = SE->getSCEVAtScope(SH, L->getParentLoop()); - if (isa<SCEVCouldNotCompute>(ExitValue) || - !ExitValue->isLoopInvariant(L)) + SCEVHandle ExitValue = SE->getSCEVAtScope(Inst, L->getParentLoop()); + if (!ExitValue->isLoopInvariant(L)) continue; Changed = true; |

