[PATCH] D76944: [GVN] Fix VNCoercion/BasicAA for Scalable Vector.

Huihui Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 10:16:40 PDT 2020


huihuiz added inline comments.


================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:543
+      Type *GEPIdxedTy = GTI.getIndexedType();
+      if (GEPIdxedTy->isVectorTy() && GEPIdxedTy->getVectorIsScalable()) {
+        GepHasConstantOffset = false;
----------------
efriedma wrote:
> Can you check DL.getTypeAllocSize(GEPIdxedTy).Scalable instead, since you're calling getTypeAllocSize anyway?
> 
> I don't think this is the right way to break out of this loop early; if the offset isn't recorded in "Decomposed", other code might assume it's zero?
Spend sometime look again, BasicAAResult::aliasGEP is using the offset/varIndices recorded in DecomposedGEP. For scalable type, we might end up inaccurate alias result.

Working on fixes for this logic.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76944





More information about the llvm-commits mailing list