[PATCH] D120240: [InstCombine] Bail out of load-store forwarding for scalable vector types

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 21 08:29:13 PST 2022


sdesmalen accepted this revision.
sdesmalen added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:592
 
-  int64_t InitializerSize = DL.getTypeAllocSize(C->getType()).getFixedSize();
+  TypeSize InitializerSize = DL.getTypeAllocSize(C->getType());
 
----------------
nit: move this closer to its first use, i.e. line 599, thus below the `if (Offset <= -1 * static_cast<....)` condition that returns UndefValue.


================
Comment at: llvm/test/Transforms/InstCombine/load-store-forward.ll:276
+; exceed the store size.
+define <vscale x 4 x i8> @load_nxv4i8_store_nxv4i32(i32* %a) vscale_range(1,16) {
+; CHECK-LABEL: @load_nxv4i8_store_nxv4i32(
----------------
vscale_range isn't specifically required for these tests, you can remove it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120240



More information about the llvm-commits mailing list