[PATCH] D47767: [SCEV] Drop cached info after late nsw/nuw flags setting
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 9 22:59:18 PDT 2018
sanjoy added a comment.
Can you please also add a SCEV-only test case?
================
Comment at: lib/Analysis/ScalarEvolution.cpp:1634
auto NewFlags = proveNoWrapViaConstantRanges(AR);
const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(NewFlags);
+ forgetMemoizedResults(AR);
----------------
Let's pull out a `setNoWrapFlagsOnAddRec` helper that does the right thing and has a comment explaining what's going on and what the alternatives are.
https://reviews.llvm.org/D47767
More information about the llvm-commits
mailing list