Skip to content

Commit 3094e53

Browse files
committed
[AArch64] Add a Machine Value Type for 8 consecutive registers
Adds MVT::i64x8, a Machine Value Type needed for lowering inline assembly operands which materialize a sequence of eight general purpose registers. Differential Revision: https://reviews.llvm.org/D94096
1 parent 29b263a commit 3094e53

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

llvm/include/llvm/CodeGen/ValueTypes.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ def untyped : ValueType<8, 174>; // Produces an untyped value
216216
def funcref : ValueType<0, 175>; // WebAssembly's funcref type
217217
def externref : ValueType<0, 176>; // WebAssembly's externref type
218218
def x86amx : ValueType<8192, 177>; // X86 AMX value
219+
def i64x8 : ValueType<512, 178>; // 8 Consecutive GPRs (AArch64)
219220

220221

221222
def token : ValueType<0, 248>; // TokenTy

llvm/include/llvm/Support/MachineValueType.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,10 @@ namespace llvm {
270270
funcref = 175, // WebAssembly's funcref type
271271
externref = 176, // WebAssembly's externref type
272272
x86amx = 177, // This is an X86 AMX value
273+
i64x8 = 178, // 8 Consecutive GPRs (AArch64)
273274

274275
FIRST_VALUETYPE = 1, // This is always the beginning of the list.
275-
LAST_VALUETYPE = x86amx, // This always remains at the end of the list.
276+
LAST_VALUETYPE = i64x8, // This always remains at the end of the list.
276277
VALUETYPE_SIZE = LAST_VALUETYPE + 1,
277278

278279
// This is the current maximum for LAST_VALUETYPE.
@@ -987,6 +988,7 @@ namespace llvm {
987988
case nxv16f16:
988989
case nxv8f32:
989990
case nxv4f64: return TypeSize::Scalable(256);
991+
case i64x8:
990992
case v512i1:
991993
case v64i8:
992994
case v32i16:

llvm/lib/CodeGen/ValueTypes.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ std::string EVT::getEVTString() const {
167167
case MVT::Glue: return "glue";
168168
case MVT::x86mmx: return "x86mmx";
169169
case MVT::x86amx: return "x86amx";
170+
case MVT::i64x8: return "i64x8";
170171
case MVT::Metadata: return "Metadata";
171172
case MVT::Untyped: return "Untyped";
172173
case MVT::funcref: return "funcref";
@@ -198,6 +199,7 @@ Type *EVT::getTypeForEVT(LLVMContext &Context) const {
198199
case MVT::ppcf128: return Type::getPPC_FP128Ty(Context);
199200
case MVT::x86mmx: return Type::getX86_MMXTy(Context);
200201
case MVT::x86amx: return Type::getX86_AMXTy(Context);
202+
case MVT::i64x8: return IntegerType::get(Context, 512);
201203
case MVT::externref:
202204
return PointerType::get(StructType::create(Context), 10);
203205
case MVT::funcref:

llvm/utils/TableGen/CodeGenTarget.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ StringRef llvm::getEnumName(MVT::SimpleValueType T) {
7777
case MVT::ppcf128: return "MVT::ppcf128";
7878
case MVT::x86mmx: return "MVT::x86mmx";
7979
case MVT::x86amx: return "MVT::x86amx";
80+
case MVT::i64x8: return "MVT::i64x8";
8081
case MVT::Glue: return "MVT::Glue";
8182
case MVT::isVoid: return "MVT::isVoid";
8283
case MVT::v1i1: return "MVT::v1i1";

0 commit comments

Comments
 (0)