[llvm] [X86] Support EGPR (R16-R31) for APX (PR #70958)

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 18:56:47 PST 2023


================
@@ -611,6 +615,14 @@ BitVector X86RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
     }
   }
 
+  // Reserve the extended general purpose registers.
+  if (!Is64Bit || !MF.getSubtarget<X86Subtarget>().hasEGPR()) {
+    for (unsigned n = 0; n != 16; ++n) {
+      for (MCRegAliasIterator AI(X86::R16 + n, this, true); AI.isValid(); ++AI)
+        Reserved.set(*AI);
+    }
----------------
KanRobert wrote:

@nikic Good suggestion! Done.

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


More information about the llvm-commits mailing list