[PATCH] D133433: [AArch64]: Force generating code compatible to streaming mode

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 11:15:18 PDT 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:1398
+    if (Subtarget->forceStreamingModeCompatibleSVE()) {
+      for (MVT VT : MVT::integer_fixedlen_vector_valuetypes())
+        if (useSVEForFixedLengthVectorVT(VT, true))
----------------
Unlike `useSVEForFixedLengthVectors()` mode where the MVTs are not know ahead of time, the use case for `forceStreamingModeCompatibleSVE()` mode is specific to 128-bit and 64-bit vectors and so you shouldn't need to iterate across all vector types.


================
Comment at: llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-stores.ll:3-17
+; RUN: llc -aarch64-sve-vector-bits-min=256 -force-streaming-mode-compatible-sve < %s | FileCheck %s
+; RUN: llc -aarch64-sve-vector-bits-min=384 -force-streaming-mode-compatible-sve < %s | FileCheck %s
+; RUN: llc -aarch64-sve-vector-bits-min=512 -force-streaming-mode-compatible-sve < %s | FileCheck %s
+; RUN: llc -aarch64-sve-vector-bits-min=640 -force-streaming-mode-compatible-sve < %s | FileCheck %s
+; RUN: llc -aarch64-sve-vector-bits-min=768 -force-streaming-mode-compatible-sve < %s | FileCheck %s
+; RUN: llc -aarch64-sve-vector-bits-min=896 -force-streaming-mode-compatible-sve < %s | FileCheck %s
+; RUN: llc -aarch64-sve-vector-bits-min=1024 -force-streaming-mode-compatible-sve < %s | FileCheck %s
----------------
You shouldn't need to test all these combinations.  It should be sufficient to test without any `-aarch64-sve-vector-bits-min=` options as that's the expected use case.  For the tests themselves you want to add some that use 256bit vectors to verify we don't emit neon instructions as part of type legalisation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133433



More information about the llvm-commits mailing list