[PATCH] D86364: [ValueTracking] Interpret GEPs as a series of adds multiplied by the related scaling factor

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 10:29:35 PDT 2020


qcolombet added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1506
+        if (IndexTypeSize.isScalable())
+          AddrKnownBits.resetAll();
+        if (!AddrKnownBits.isUnknown()) {
----------------
@nikic FYI here is where we stop to track the full address but we still compute the trailing zeros.

If we don't do that, we will lose some information compared to the previous implementation.
E.g., test/Analysis/ScalarEvolution/scalable-vector.ll will fail
:5:10: error: CHECK: expected string not found in input
; CHECK: --> (3 * sizeof(<vscale x 4 x i32>)) U: [0,-15) S: [-9223372036854775808,9223372036854775793)
         ^
<stdin>:4:2: note: scanning from here
 --> (3 * sizeof(<vscale x 4 x i32>)) U: full-set S: full-set


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86364



More information about the llvm-commits mailing list