[llvm] [AArch64] Remove copy in SVE/SME predicate spill and fill (PR #81716)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 09:07:57 PDT 2024


================
@@ -4821,13 +4821,9 @@ void AArch64InstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
     } else if (AArch64::PNRRegClass.hasSubClassEq(RC)) {
       assert((Subtarget.hasSVE2p1() || Subtarget.hasSME2()) &&
              "Unexpected register store without SVE2p1 or SME2");
-      if (SrcReg.isVirtual()) {
-        auto NewSrcReg =
-            MF.getRegInfo().createVirtualRegister(&AArch64::PPRRegClass);
-        BuildMI(MBB, MBBI, DebugLoc(), get(TargetOpcode::COPY), NewSrcReg)
-            .addReg(SrcReg);
-        SrcReg = NewSrcReg;
-      } else
+      if (SrcReg.isVirtual())
----------------
SamTebbs33 wrote:

Good idea, done.

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


More information about the llvm-commits mailing list