diff options
author | Andrew Trick <atrick@apple.com> | 2011-04-27 05:42:17 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-04-27 05:42:17 +0000 |
commit | 01eff820ae0bc6ec55e389c5bb26a396816069a1 (patch) | |
tree | e3beab8e823a34db02f2d389540f991111749b1c /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 19b7acff10846907a07dc104e18c0fe72bafb3c7 (diff) | |
download | bcm5719-llvm-01eff820ae0bc6ec55e389c5bb26a396816069a1.tar.gz bcm5719-llvm-01eff820ae0bc6ec55e389c5bb26a396816069a1.zip |
Test case and comment for PR9633.
llvm-svn: 130294
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 9396b07dab9..1bef857e70a 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -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; |