[PATCH] D48853: [SCEV] Add zext(C + x + ...) -> D + zext(C-D + x + ...)<nuw> transform

Roman Tereshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 15:04:05 PDT 2018


rtereshin added inline comments.


================
Comment at: lib/Analysis/ScalarEvolution.cpp:1813
+      // KnownBits 0000 00XX, loosing Min: 1, Max: 2 to Min: 0, Max: 3.
+      // So use both if available:
+      if (OpV) {
----------------
Another thing to discuss here is the fact that SCEV appears to be relying on value range analysis implemented via `ConstantRange` instead of `KnownBits`. It appears to me that we could achieve better results if we used //both// simultaneously updating them properly. See the example above justifying that.

Do you think it's worth bringing up at dev mailing list level?


Repository:
  rL LLVM

https://reviews.llvm.org/D48853





More information about the llvm-commits mailing list