[llvm] [AArch64][SVE] Pair SVE fill/spill into LDP/STP with -msve-vector-bits=128. (PR #134068)

Ricardo Jesus via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 07:02:43 PDT 2025


================
@@ -2840,6 +2883,9 @@ bool AArch64LoadStoreOpt::optimizeBlock(MachineBasicBlock &MBB,
     updateDefinedRegisters(*MBBI, DefinedInBB, TRI);
     if (TII->isPairableLdStInst(*MBBI) && tryToPairLdStInst(MBBI))
       Modified = true;
+    else if (CanPairFillSpill && isPairableFillSpillInst(*MBBI) &&
+             tryToPairLdStInst(MBBI))
+      Modified = true;
----------------
rj-jesus wrote:

I believe `isPairableLdStInst` is static, but I needed to query the subtarget to perform the checks that `CanPairFillSpill` is doing. I thought it would be better to add the new path to reduce the number of changes, but I'm happy to revisit this if you have a better idea.

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


More information about the llvm-commits mailing list