[llvm] [Mips] Introduce ABI-specific register names and accessors (PR #224284)

Ying Huang via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 01:28:15 PDT 2026


================
@@ -3054,11 +3053,11 @@ static bool CC_MipsO32(unsigned ValNo, MVT ValVT, MVT LocVT,
   const MipsSubtarget &Subtarget = static_cast<const MipsSubtarget &>(
       State.getMachineFunction().getSubtarget());
 
-  static const MCPhysReg IntRegs[] = { Mips::A0, Mips::A1, Mips::A2, Mips::A3 };
+  ArrayRef<MCPhysReg> IntRegs = MipsABIInfo::O32().getArgRegs(false);
 
   static const MCPhysReg F32Regs[] = { Mips::F12, Mips::F14 };
 
-  static const MCPhysReg FloatVectorIntRegs[] = { Mips::A0, Mips::A2 };
+  static const MCPhysReg FloatVectorIntRegs[] = {Mips::A0, Mips::A2};
----------------
yingopq wrote:

use `getArgReg()`

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


More information about the llvm-commits mailing list