[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
Fri Mar 15 02:51:25 PDT 2024


================
@@ -1770,6 +1788,15 @@ class AArch64Operand : public MCParsedAsmOperand {
     Inst.addOperand(MCOperand::createReg(AArch64::Z0 + getReg() - Base));
   }
 
+  void addPPRorPNRRegOperands(MCInst &Inst, unsigned N) const {
+    assert(N == 1 && "Invalid number of operands!");
+    unsigned Reg = getReg();
+    // Normalise to PPR
+    if (Reg >= AArch64::PN0)
+      Reg = Reg - AArch64::PN0 + AArch64::P0;
+    Inst.addOperand(MCOperand::createReg(Reg));
+  }
+
----------------
sdesmalen-arm wrote:

Can `addPNRasPPRRegOperands` be removed now? Or perhaps I should ask: is `PNRasPPR` still required, or can those instructions that use it also use `PPRorPNRRegOperand` ?

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


More information about the llvm-commits mailing list