[PATCH] D78081: [InstCombine][SVE] Fix visitGetElementPtrInst for scalable type.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 22:47:00 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2494
+      // Skip if allocated type is scalable. The type alloc size is unknown at
+      // compile-time.
+      if (!IsAllocScalable && GEP.accumulateConstantOffset(DL, BasePtrOffset) &&
----------------
Can you just use `DL.getTypeAllocSize(AI->getAllocatedType()).getKnownMinSize()` here, instead of bailing out?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78081





More information about the llvm-commits mailing list