[PATCH] D93973: [SCEV] Simplify trunc to zero based on known bits

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 2 07:58:33 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:1181
+    // desired recursion depth, only do this for unknown SCEV's.
+    if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(Op)) {
+      uint32_t MinTrailingZeros = GetMinTrailingZeros(Op);
----------------
Are you worried about the cost of calling `GetMintrailingZeros` here? Could it happen that we have a arbitrary SCEV expression here for which we can get more accurate results thanks to `GetMinTrailingZeros`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93973/new/

https://reviews.llvm.org/D93973



More information about the llvm-commits mailing list