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

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 08:28:38 PST 2024


================
@@ -4806,11 +4806,7 @@ void AArch64InstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
       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;
+        MF.getRegInfo().constrainRegClass(SrcReg, &AArch64::PPRRegClass);
----------------
sdesmalen-arm wrote:

nit: remove curly braces around the statement

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


More information about the llvm-commits mailing list