[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:27:52 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:
I agree, ZIP would indeed be a (much) better choice than INSR. I'm also happy with the intent of this PR. The part that isn't entirely clear to me yet is for which cases we'd want to enable this merging when we _do_ have optimal SVE codegen.
https://github.com/llvm/llvm-project/pull/111519
More information about the llvm-commits
mailing list