mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Test case and comment for PR9633.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130294 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4705,8 +4705,9 @@ const SCEV *ScalarEvolution::computeSCEVAtScope(const SCEV *V, const Loop *L) {
|
||||
getAddRecExpr(NewOps, AddRec->getLoop(),
|
||||
AddRec->getNoWrapFlags(SCEV::FlagNW));
|
||||
AddRec = dyn_cast<SCEVAddRecExpr>(FoldedRec);
|
||||
// In cases with "undef" values, a loop's own recurrence may
|
||||
// fold into a constant. Go ahead and return the optimistic value.
|
||||
// The addrec may be folded to a nonrecurrence, for example, if the
|
||||
// induction variable is multiplied by zero after constant folding. Go
|
||||
// ahead and return the folded value.
|
||||
if (!AddRec)
|
||||
return FoldedRec;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user