diff options
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;  | 

