[PATCH] D101181: [SCEV] Compute ranges for ashr recurrences

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 28 12:48:48 PDT 2021


reames added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:5741
+                                          KnownStart.getMaxValue() + 1);
+      CR = CR.intersectWith(R);
+    } else if (KnownStart.isNegative()) {
----------------
nikic wrote:
> 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.
Done in 0cc3e10f


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