[PATCH] D34273: [SCEV] Use depth limit instead of local cache for SExt and ZExt

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 15:30:55 PDT 2017


wmi added a comment.

Thanks for helping on fixing the bug!



================
Comment at: lib/Analysis/ScalarEvolution.cpp:1579
         return getAddRecExpr(
-            getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this, Cache),
-            getZeroExtendExprCached(Step, Ty, Cache), L, AR->getNoWrapFlags());
+            getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this),
+            getZeroExtendExpr(Step, Ty, Depth + 1), L, AR->getNoWrapFlags());
----------------
Do we want to pass Depth into getExtendAddRecStart?  Since getZeroExtendExpr and getSignExtendExpr can be called recursively inside of getExtendAddRecStart.


https://reviews.llvm.org/D34273





More information about the llvm-commits mailing list