[PATCH] D140229: [SeparateConstOffsetFromGEP] Remove TypeSize error when collecting constant indices.

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 14:04:33 PST 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp:1015
+      // Constant offsets of scalable types are not really constant.
+      if (DL->getTypeAllocSize(GTI.getIndexedType()).isScalable())
+        continue;
----------------
arsenm wrote:
> arsenm wrote:
> > Is there not a way to directly check isScalable on the type without going through getTypeAllocSize?
> Looks like we're missing isScalableVectorTy, it should be there
I guess I was trying to be future proof.  However, currently scalable vectors cannot be in arrays and struct support is purely in register and thus cannot be indexed via getelementptr.

If this changes then the same TypeSize error will be triggered as was the case for the scenario this patch fixes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140229



More information about the llvm-commits mailing list