[PATCH] D76464: [ValueTracking][SVE] Fix getOffsetFromIndex for scalable vector.
    Eli Friedman via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Mar 19 18:40:01 PDT 2020
    
    
  
efriedma added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:6157
     // the index by the ElementSize.
-    uint64_t Size = DL.getTypeAllocSize(GTI.getIndexedType());
+    uint64_t Size = DL.getTypeAllocSize(GTI.getIndexedType()).getFixedSize();
     Offset += Size * OpC->getSExtValue();
----------------
If we're calling getTypeAllocSize anyway, can we just check whether it returns a scalable TypeSize?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76464/new/
https://reviews.llvm.org/D76464
    
    
More information about the llvm-commits
mailing list