[PATCH] D101181: [SCEV] Compute ranges for ashr recurrences
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 23 12:31:34 PDT 2021
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:5695
// TODO: Extend to other opcodes such as ashr, mul, and div
switch (BO->getOpcode()) {
----------------
Outdated TODO
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:5741
+ KnownStart.getMaxValue() + 1);
+ CR = CR.intersectWith(R);
+ } else if (KnownStart.isNegative()) {
----------------
As a general note on this function: You initialize CR to the full set, then always intersect you result with it, and return the intersection... you may as well just directly return your result range.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101181/new/
https://reviews.llvm.org/D101181
More information about the llvm-commits
mailing list