[llvm] [AArch64] Disable consecutive store merging when Neon is unavailable (PR #111519)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 03:34:27 PDT 2024


================
@@ -27924,6 +27924,24 @@ bool AArch64TargetLowering::isIntDivCheap(EVT VT, AttributeList Attr) const {
   return OptSize && !VT.isVector();
 }
 
+bool AArch64TargetLowering::canMergeStoresTo(unsigned AddressSpace, EVT MemVT,
+                                             const MachineFunction &MF) const {
+  // Avoid merging stores into fixed-length vectors when Neon is unavailable.
+  // In future, we could allow this when SVE is available, but currently,
+  // the SVE lowerings for BUILD_VECTOR are limited to a few specific cases (and
+  // the general lowering may introduce stack spills/reloads).
----------------
sdesmalen-arm wrote:

FWIW, I just manually tried the <4 x float> case: https://godbolt.org/z/MYzrdahjh 
I'd say that the SVE version using zip1 is no less efficient than this.

https://github.com/llvm/llvm-project/pull/111519


More information about the llvm-commits mailing list