mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-11 07:22:17 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user