[NFC][AArch64] SME2 Add instruction name convention and fix LookupTable number of...
authorCaroline Concatto <caroline.concatto@arm.com>
Tue, 8 Nov 2022 12:49:56 +0000 (12:49 +0000)
committerCaroline Concatto <caroline.concatto@arm.com>
Tue, 15 Nov 2022 12:09:51 +0000 (12:09 +0000)
This patch adds the name convention for SME instructions.
This patch fixes the number of registers for LookUpTable in the AsmParser.
The number of registers is not used atm, but it is needed.
The switch case in getNumRegsForRegKind needs to have all the
RegKind enum.

llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

index b1c7ea8..468db59 100644 (file)
@@ -26,6 +26,18 @@ def AArch64_restore_za : SDNode<"AArch64ISD::RESTORE_ZA", SDTypeProfile<0, 3,
 def AArch64ObscureCopy : SDNode<"AArch64ISD::OBSCURE_COPY", SDTypeProfile<1, 1, []>, []>;
 
 //===----------------------------------------------------------------------===//
+// Instruction naming conventions.
+//===----------------------------------------------------------------------===//
+
+// M = SME array register (ZA)
+// P = Predicate register
+// C = Predicate-as-counter register
+// I = immediate
+// Z = SVE vector register
+// T = ZT0 register
+//
+
+//===----------------------------------------------------------------------===//
 // Add vector elements horizontally or vertically to ZA tile.
 //===----------------------------------------------------------------------===//
 
index 39501c2..18fe871 100644 (file)
@@ -2890,7 +2890,7 @@ unsigned AArch64AsmParser::getNumRegsForRegKind(RegKind K) {
   case RegKind::SVEPredicateAsCounter:
     return 16;
   case RegKind::LookupTable:
-   return 512;
+   return 1;
   }
   llvm_unreachable("Unsupported RegKind");
 }