[PATCH] D145404: [LLVM] Remove support for constant scalable vector GEPs.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 11:21:05 PST 2023


nikic added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:2353-2355
-      // If datalayout has no special restrictions on vector data layout,
-      // replace `llvm.vscale` by an equivalent constant expression
-      // to benefit from cheap constant propagation.
----------------
paulwalker-arm wrote:
> Just being able to remove this wholesale seems optimistic but it doesn't seem to have any relevant test coverage.
I'd suggest landing this as a separate change ahead of time.


================
Comment at: llvm/test/Transforms/InstSimplify/vscale.ll:187
+; CHECK-LABEL: @getelementptr_not_constant_foldable_1(
+; CHECK-NEXT:    [[PTR:%.*]] = getelementptr <vscale x 4 x i32>, ptr null, <vscale x 4 x i64> undef
+; CHECK-NEXT:    ret <vscale x 4 x ptr> [[PTR]]
----------------
This case should still fold.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145404



More information about the llvm-commits mailing list