Skip to content

Commit ce6ad93

Browse files
committed
[llvm][RISCV] Add RISCV vector tuple type to value types(MVT)
This patch handles the types(MVT) in `selectionDAG` for RISCV vector tuples. As described in previous patch handling llvm types, the MVTs also have 32 variants: ``` riscv_mf8x2, riscv_mf8x3, riscv_mf8x4, riscv_mf8x5, riscv_mf8x6, riscv_mf8x7, riscv_mf8x8, riscv_mf4x2, riscv_mf4x3, riscv_mf4x4, riscv_mf4x5, riscv_mf4x6, riscv_mf4x7, riscv_mf4x8, riscv_mf2x2, riscv_mf2x3, riscv_mf2x4, riscv_mf2x5, riscv_mf2x6, riscv_mf2x7, riscv_mf2x8, riscv_m1x2, riscv_m1x3, riscv_m1x4, riscv_m1x5, riscv_m1x6, riscv_m1x7, riscv_m1x8, riscv_m2x2, riscv_m2x3, riscv_m2x4, riscv_m4x2. ``` An intuitive way to model vector tuple type is using nested scalable vector, e.g. `nElts=NF, EltTy=nxv2i32`. However it's not compatible to what we've done to handle scalable vector in TargetLowering, so it would need more effort to change the code to handle this concept. Another approach is encoding the `LMUL` info in `sz` of `MVT`, e.g. `nElts=NF, sz=(LMUL*NF*RVVBitsPerBlock)`, this makes it much easier to handle and changes less code. This patch adopts the latter approach.
1 parent aee072c commit ce6ad93

File tree

6 files changed

+133
-27
lines changed

6 files changed

+133
-27
lines changed

llvm/include/llvm/CodeGen/ValueTypes.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ namespace llvm {
8787
return getExtendedVectorVT(Context, VT, EC);
8888
}
8989

90+
/// Returns the EVT that represents a vector tuple type.
91+
static EVT getRISCVVectorTupleVT(int Log2LMUL, unsigned NFields) {
92+
// Sz = NF * LMUL * BitsPerBlock
93+
unsigned Sz =
94+
NFields * (Log2LMUL < 0 ? (64 >> -Log2LMUL) : (64 << Log2LMUL));
95+
return MVT::getRISCVVectorTupleVT(Sz, NFields);
96+
}
97+
9098
/// Return a vector with the same number of elements as this vector, but
9199
/// with the element type converted to an integer type with the same
92100
/// bitwidth.
@@ -174,6 +182,9 @@ namespace llvm {
174182
return isSimple() ? V.isScalableVector() : isExtendedScalableVector();
175183
}
176184

185+
/// Return true if this is a vector value type.
186+
bool isRISCVVectorTuple() const { return V.isRISCVVectorTuple(); }
187+
177188
bool isFixedLengthVector() const {
178189
return isSimple() ? V.isFixedLengthVector()
179190
: isExtendedFixedLengthVector();

llvm/include/llvm/CodeGen/ValueTypes.td

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class ValueType<int size, int value> {
2323
bit isFP = false;
2424
bit isVector = false;
2525
bit isScalable = false;
26+
bit isRISCVVecTuple = false;
2627
// Indicates this VT should be included in the
2728
// [FIRST_VALUETYPE,LAST_VALUETYPE] range.
2829
bit isNormalValueType = true;
@@ -56,6 +57,14 @@ class VTScalableVec<int nelem, ValueType elt, int value>
5657
let isScalable = true;
5758
}
5859

60+
class VTVecTup<int size, int nf, ValueType dummy_elt, int value>
61+
: ValueType<size, value> {
62+
let nElem = nf;
63+
let isVector = true;
64+
let ElementType = dummy_elt;
65+
let isRISCVVecTuple = true;
66+
}
67+
5968
defset list<ValueType> ValueTypes = {
6069

6170
def OtherVT : ValueType<0, 1> { // "Other" value
@@ -273,20 +282,54 @@ def nxv2f64 : VTScalableVec<2, f64, 187>; // n x 2 x f64 vector value
273282
def nxv4f64 : VTScalableVec<4, f64, 188>; // n x 4 x f64 vector value
274283
def nxv8f64 : VTScalableVec<8, f64, 189>; // n x 8 x f64 vector value
275284

276-
def x86mmx : ValueType<64, 190>; // X86 MMX value
277-
def Glue : ValueType<0, 191>; // Pre-RA sched glue
278-
def isVoid : ValueType<0, 192>; // Produces no value
279-
def untyped : ValueType<8, 193> { // Produces an untyped value
285+
// Sz = NF * LMUL * BitsPerBlock
286+
def riscv_mf8x2 : VTVecTup<16, 2, i8, 190>; // RISCV vector tuple(lmul=mf8, nf=2)
287+
def riscv_mf8x3 : VTVecTup<24, 3, i8, 191>; // RISCV vector tuple(lmul=mf8, nf=3)
288+
def riscv_mf8x4 : VTVecTup<32, 4, i8, 192>; // RISCV vector tuple(lmul=mf8, nf=4)
289+
def riscv_mf8x5 : VTVecTup<40, 5, i8, 193>; // RISCV vector tuple(lmul=mf8, nf=5)
290+
def riscv_mf8x6 : VTVecTup<48, 6, i8, 194>; // RISCV vector tuple(lmul=mf8, nf=6)
291+
def riscv_mf8x7 : VTVecTup<56, 7, i8, 195>; // RISCV vector tuple(lmul=mf8, nf=7)
292+
def riscv_mf8x8 : VTVecTup<64, 8, i8, 196>; // RISCV vector tuple(lmul=mf8, nf=8)
293+
def riscv_mf4x2 : VTVecTup<32, 2, i8, 197>; // RISCV vector tuple(lmul=mf4, nf=2)
294+
def riscv_mf4x3 : VTVecTup<48, 3, i8, 198>; // RISCV vector tuple(lmul=mf4, nf=3)
295+
def riscv_mf4x4 : VTVecTup<64, 4, i8, 199>; // RISCV vector tuple(lmul=mf4, nf=4)
296+
def riscv_mf4x5 : VTVecTup<80, 5, i8, 200>; // RISCV vector tuple(lmul=mf4, nf=5)
297+
def riscv_mf4x6 : VTVecTup<96, 6, i8, 201>; // RISCV vector tuple(lmul=mf4, nf=6)
298+
def riscv_mf4x7 : VTVecTup<112, 7, i8, 202>; // RISCV vector tuple(lmul=mf4, nf=7)
299+
def riscv_mf4x8 : VTVecTup<128, 8, i8, 203>; // RISCV vector tuple(lmul=mf4, nf=8)
300+
def riscv_mf2x2 : VTVecTup<64, 2, i8, 204>; // RISCV vector tuple(lmul=mf2, nf=2)
301+
def riscv_mf2x3 : VTVecTup<96, 3, i8, 205>; // RISCV vector tuple(lmul=mf2, nf=3)
302+
def riscv_mf2x4 : VTVecTup<128, 4, i8, 206>; // RISCV vector tuple(lmul=mf2, nf=4)
303+
def riscv_mf2x5 : VTVecTup<160, 5, i8, 207>; // RISCV vector tuple(lmul=mf2, nf=5)
304+
def riscv_mf2x6 : VTVecTup<192, 6, i8, 208>; // RISCV vector tuple(lmul=mf2, nf=6)
305+
def riscv_mf2x7 : VTVecTup<224, 7, i8, 209>; // RISCV vector tuple(lmul=mf2, nf=7)
306+
def riscv_mf2x8 : VTVecTup<256, 8, i8, 210>; // RISCV vector tuple(lmul=mf2, nf=8)
307+
def riscv_m1x2 : VTVecTup<128, 2, i8, 211>; // RISCV vector tuple(lmul=1, nf=2)
308+
def riscv_m1x3 : VTVecTup<192, 3, i8, 212>; // RISCV vector tuple(lmul=1, nf=3)
309+
def riscv_m1x4 : VTVecTup<256, 4, i8, 213>; // RISCV vector tuple(lmul=1, nf=4)
310+
def riscv_m1x5 : VTVecTup<320, 5, i8, 214>; // RISCV vector tuple(lmul=1, nf=5)
311+
def riscv_m1x6 : VTVecTup<384, 6, i8, 215>; // RISCV vector tuple(lmul=1, nf=6)
312+
def riscv_m1x7 : VTVecTup<448, 7, i8, 216>; // RISCV vector tuple(lmul=1, nf=7)
313+
def riscv_m1x8 : VTVecTup<512, 8, i8, 217>; // RISCV vector tuple(lmul=1, nf=8)
314+
def riscv_m2x2 : VTVecTup<256, 2, i8, 218>; // RISCV vector tuple(lmul=2, nf=2)
315+
def riscv_m2x3 : VTVecTup<384, 3, i8, 219>; // RISCV vector tuple(lmul=2, nf=3)
316+
def riscv_m2x4 : VTVecTup<512, 4, i8, 220>; // RISCV vector tuple(lmul=2, nf=4)
317+
def riscv_m4x2 : VTVecTup<512, 2, i8, 221>; // RISCV vector tuple(lmul=4, nf=2)
318+
319+
def x86mmx : ValueType<64, 222>; // X86 MMX value
320+
def Glue : ValueType<0, 223>; // Pre-RA sched glue
321+
def isVoid : ValueType<0, 224>; // Produces no value
322+
def untyped : ValueType<8, 225> { // Produces an untyped value
280323
let LLVMName = "Untyped";
281324
}
282-
def funcref : ValueType<0, 194>; // WebAssembly's funcref type
283-
def externref : ValueType<0, 195>; // WebAssembly's externref type
284-
def exnref : ValueType<0, 196>; // WebAssembly's exnref type
285-
def x86amx : ValueType<8192, 197>; // X86 AMX value
286-
def i64x8 : ValueType<512, 198>; // 8 Consecutive GPRs (AArch64)
325+
def funcref : ValueType<0, 226>; // WebAssembly's funcref type
326+
def externref : ValueType<0, 227>; // WebAssembly's externref type
327+
def exnref : ValueType<0, 228>; // WebAssembly's exnref type
328+
def x86amx : ValueType<8192, 229>; // X86 AMX value
329+
def i64x8 : ValueType<512, 230>; // 8 Consecutive GPRs (AArch64)
287330
def aarch64svcount
288-
: ValueType<16, 199>; // AArch64 predicate-as-counter
289-
def spirvbuiltin : ValueType<0, 200>; // SPIR-V's builtin type
331+
: ValueType<16, 231>; // AArch64 predicate-as-counter
332+
def spirvbuiltin : ValueType<0, 232>; // SPIR-V's builtin type
290333

291334
let isNormalValueType = false in {
292335
def token : ValueType<0, 248>; // TokenTy

llvm/include/llvm/CodeGenTypes/MachineValueType.h

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ namespace llvm {
3838
// are considered extended value types.
3939
INVALID_SIMPLE_VALUE_TYPE = 0,
4040

41-
#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc, NElem, EltTy) Ty = n,
41+
#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc, Tup, NElem, EltTy) \
42+
Ty = n,
4243
#define GET_VT_RANGES
4344
#include "llvm/CodeGen/GenVT.inc"
4445
#undef GET_VT_ATTR
@@ -113,6 +114,13 @@ namespace llvm {
113114
SimpleTy <= MVT::LAST_SCALABLE_VECTOR_VALUETYPE);
114115
}
115116

117+
/// Return true if this is a RISCV vector tuple type where the
118+
/// runtime length is machine dependent
119+
bool isRISCVVectorTuple() const {
120+
return (SimpleTy >= MVT::FIRST_RISCV_VECTOR_TUPLE_VALUETYPE &&
121+
SimpleTy <= MVT::LAST_RISCV_VECTOR_TUPLE_VALUETYPE);
122+
}
123+
116124
/// Return true if this is a custom target type that has a scalable size.
117125
bool isScalableTargetExtVT() const {
118126
return SimpleTy == MVT::aarch64svcount;
@@ -171,7 +179,7 @@ namespace llvm {
171179
/// Return true if this is an overloaded type for TableGen.
172180
bool isOverloaded() const {
173181
switch (SimpleTy) {
174-
#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc, NElem, EltTy) \
182+
#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc, Tup, NElem, EltTy) \
175183
case Ty: \
176184
return Any;
177185
#include "llvm/CodeGen/GenVT.inc"
@@ -254,7 +262,8 @@ namespace llvm {
254262
MVT getVectorElementType() const {
255263
assert(SimpleTy >= FIRST_VALUETYPE && SimpleTy <= LAST_VALUETYPE);
256264
static constexpr SimpleValueType EltTyTable[] = {
257-
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, NElem, EltTy) EltTy,
265+
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, Tup, NElem, EltTy) \
266+
EltTy,
258267
#include "llvm/CodeGen/GenVT.inc"
259268
#undef GET_VT_ATTR
260269
};
@@ -267,7 +276,8 @@ namespace llvm {
267276
unsigned getVectorMinNumElements() const {
268277
assert(SimpleTy >= FIRST_VALUETYPE && SimpleTy <= LAST_VALUETYPE);
269278
static constexpr uint16_t NElemTable[] = {
270-
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, NElem, EltTy) NElem,
279+
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, Tup, NElem, EltTy) \
280+
NElem,
271281
#include "llvm/CodeGen/GenVT.inc"
272282
#undef GET_VT_ATTR
273283
};
@@ -296,7 +306,7 @@ namespace llvm {
296306
/// base size.
297307
TypeSize getSizeInBits() const {
298308
static constexpr TypeSize SizeTable[] = {
299-
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, NElem, EltTy) \
309+
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, Tup, NElem, EltTy) \
300310
TypeSize(Sz, Sc || Ty == aarch64svcount /* FIXME: Not in the td. */),
301311
#include "llvm/CodeGen/GenVT.inc"
302312
#undef GET_VT_ATTR
@@ -418,7 +428,7 @@ namespace llvm {
418428
}
419429

420430
static MVT getFloatingPointVT(unsigned BitWidth) {
421-
#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc, NElem, EltTy) \
431+
#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc, Tup, NElem, EltTy) \
422432
if (FP == 3 && sz == BitWidth) \
423433
return Ty;
424434
#include "llvm/CodeGen/GenVT.inc"
@@ -428,7 +438,7 @@ namespace llvm {
428438
}
429439

430440
static MVT getIntegerVT(unsigned BitWidth) {
431-
#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc, NElem, EltTy) \
441+
#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc, Tup, NElem, EltTy) \
432442
if (Int == 3 && sz == BitWidth) \
433443
return Ty;
434444
#include "llvm/CodeGen/GenVT.inc"
@@ -438,8 +448,8 @@ namespace llvm {
438448
}
439449

440450
static MVT getVectorVT(MVT VT, unsigned NumElements) {
441-
#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy) \
442-
if (!Sc && VT.SimpleTy == ElTy && NumElements == nElem) \
451+
#define GET_VT_VECATTR(Ty, Sc, Tup, nElem, ElTy) \
452+
if (!Sc && !Tup && VT.SimpleTy == ElTy && NumElements == nElem) \
443453
return Ty;
444454
#include "llvm/CodeGen/GenVT.inc"
445455
#undef GET_VT_VECATTR
@@ -448,7 +458,7 @@ namespace llvm {
448458
}
449459

450460
static MVT getScalableVectorVT(MVT VT, unsigned NumElements) {
451-
#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy) \
461+
#define GET_VT_VECATTR(Ty, Sc, Tup, nElem, ElTy) \
452462
if (Sc && VT.SimpleTy == ElTy && NumElements == nElem) \
453463
return Ty;
454464
#include "llvm/CodeGen/GenVT.inc"
@@ -457,6 +467,16 @@ namespace llvm {
457467
return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
458468
}
459469

470+
static MVT getRISCVVectorTupleVT(unsigned Sz, unsigned NFields) {
471+
#define GET_VT_ATTR(Ty, n, sz, Any, Int, FP, Vec, Sc, Tup, nElem, EltTy) \
472+
if (Tup && sz == Sz && nElem == NFields) \
473+
return Ty;
474+
#include "llvm/CodeGen/GenVT.inc"
475+
#undef GET_VT_ATTR
476+
477+
llvm_unreachable("Invalid RISCV vector tuple type");
478+
}
479+
460480
static MVT getVectorVT(MVT VT, unsigned NumElements, bool IsScalable) {
461481
if (IsScalable)
462482
return getScalableVectorVT(VT, NumElements);

llvm/lib/CodeGen/ValueTypes.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ TypeSize EVT::getExtendedSizeInBits() const {
161161
std::string EVT::getEVTString() const {
162162
switch (V.SimpleTy) {
163163
default:
164+
if (isRISCVVectorTuple()) {
165+
unsigned Sz = getSizeInBits();
166+
unsigned NF = getVectorMinNumElements();
167+
int Log2LMUL = Log2_64(Sz / NF) - 6;
168+
return "riscv_m" +
169+
((Log2LMUL < 0 ? "f" : "") + utostr(1 << std::abs(Log2LMUL))) +
170+
"x" + utostr(getVectorMinNumElements());
171+
}
164172
if (isVector())
165173
return (isScalableVector() ? "nxv" : "v") +
166174
utostr(getVectorElementCount().getKnownMinValue()) +
@@ -249,6 +257,14 @@ MVT MVT::getVT(Type *Ty, bool HandleUnknown){
249257
return MVT(MVT::aarch64svcount);
250258
else if (TargetExtTy->getName().starts_with("spirv."))
251259
return MVT(MVT::spirvbuiltin);
260+
if (TargetExtTy->getName() == "riscv_vec_tuple") {
261+
unsigned Sz = cast<ScalableVectorType>(TargetExtTy->getTypeParameter(0))
262+
->getMinNumElements() *
263+
8;
264+
unsigned NF = TargetExtTy->getIntParameter(0);
265+
266+
return MVT::getRISCVVectorTupleVT(Sz * NF, NF);
267+
}
252268
if (HandleUnknown)
253269
return MVT(MVT::Other);
254270
llvm_unreachable("Unknown target ext type!");

llvm/utils/TableGen/Common/CodeGenTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ StringRef llvm::getName(MVT::SimpleValueType T) {
6363
StringRef llvm::getEnumName(MVT::SimpleValueType T) {
6464
// clang-format off
6565
switch (T) {
66-
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, NElem, EltTy) \
66+
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, Tup, NElem, EltTy) \
6767
case MVT::Ty: return "MVT::" # Ty;
6868
#include "llvm/CodeGen/GenVT.inc"
6969
default: llvm_unreachable("ILLEGAL VALUE TYPE!");

llvm/utils/TableGen/VTEmitter.cpp

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ class VTEmitter {
3131

3232
static void VTtoGetLLVMTyString(raw_ostream &OS, const Record *VT) {
3333
bool IsVector = VT->getValueAsBit("isVector");
34+
bool IsRISCVVecTuple = VT->getValueAsBit("isRISCVVecTuple");
35+
36+
if (IsRISCVVecTuple) {
37+
unsigned NElem = VT->getValueAsInt("nElem");
38+
unsigned Sz = VT->getValueAsInt("Size");
39+
OS << "TargetExtType::get(Context, \"riscv_vec_tuple\", "
40+
"ScalableVectorType::get(Type::getInt8Ty(Context), "
41+
<< (Sz / (NElem * 8)) << "), " << NElem << ")";
42+
return;
43+
}
44+
3445
if (IsVector)
3546
OS << (VT->getValueAsBit("isScalable") ? "Scalable" : "Fixed")
3647
<< "VectorType::get(";
@@ -109,7 +120,7 @@ void VTEmitter::run(raw_ostream &OS) {
109120
}
110121
};
111122

112-
OS << "#ifdef GET_VT_ATTR // (Ty, n, sz, Any, Int, FP, Vec, Sc)\n";
123+
OS << "#ifdef GET_VT_ATTR // (Ty, n, sz, Any, Int, FP, Vec, Sc, Tup)\n";
113124
for (const auto *VT : VTsByNumber) {
114125
if (!VT)
115126
continue;
@@ -119,20 +130,23 @@ void VTEmitter::run(raw_ostream &OS) {
119130
bool IsFP = VT->getValueAsBit("isFP");
120131
bool IsVector = VT->getValueAsBit("isVector");
121132
bool IsScalable = VT->getValueAsBit("isScalable");
133+
bool IsRISCVVecTuple = VT->getValueAsBit("isRISCVVecTuple");
122134
bool IsNormalValueType = VT->getValueAsBit("isNormalValueType");
123135
int64_t NElem = IsVector ? VT->getValueAsInt("nElem") : 0;
124136
StringRef EltName = IsVector ? VT->getValueAsDef("ElementType")->getName()
125137
: "INVALID_SIMPLE_VALUE_TYPE";
126138

127139
UpdateVTRange("INTEGER_FIXEDLEN_VECTOR_VALUETYPE", Name,
128-
IsInteger && IsVector && !IsScalable);
140+
IsInteger && IsVector && !IsScalable && !IsRISCVVecTuple);
129141
UpdateVTRange("INTEGER_SCALABLE_VECTOR_VALUETYPE", Name,
130142
IsInteger && IsScalable);
131143
UpdateVTRange("FP_FIXEDLEN_VECTOR_VALUETYPE", Name,
132-
IsFP && IsVector && !IsScalable);
144+
IsFP && IsVector && !IsScalable && !IsRISCVVecTuple);
133145
UpdateVTRange("FP_SCALABLE_VECTOR_VALUETYPE", Name, IsFP && IsScalable);
134-
UpdateVTRange("FIXEDLEN_VECTOR_VALUETYPE", Name, IsVector && !IsScalable);
146+
UpdateVTRange("FIXEDLEN_VECTOR_VALUETYPE", Name,
147+
IsVector && !IsScalable && !IsRISCVVecTuple);
135148
UpdateVTRange("SCALABLE_VECTOR_VALUETYPE", Name, IsScalable);
149+
UpdateVTRange("RISCV_VECTOR_TUPLE_VALUETYPE", Name, IsRISCVVecTuple);
136150
UpdateVTRange("VECTOR_VALUETYPE", Name, IsVector);
137151
UpdateVTRange("INTEGER_VALUETYPE", Name, IsInteger && !IsVector);
138152
UpdateVTRange("FP_VALUETYPE", Name, IsFP && !IsVector);
@@ -148,6 +162,7 @@ void VTEmitter::run(raw_ostream &OS) {
148162
<< (IsFP ? Name[0] == 'f' ? 3 : 1 : 0) << ", "
149163
<< IsVector << ", "
150164
<< IsScalable << ", "
165+
<< IsRISCVVecTuple << ", "
151166
<< NElem << ", "
152167
<< EltName << ")\n";
153168
// clang-format on
@@ -162,7 +177,7 @@ void VTEmitter::run(raw_ostream &OS) {
162177
}
163178
OS << "#endif\n\n";
164179

165-
OS << "#ifdef GET_VT_VECATTR // (Ty, Sc, nElem, ElTy)\n";
180+
OS << "#ifdef GET_VT_VECATTR // (Ty, Sc, Tup, nElem, ElTy)\n";
166181
for (const auto *VT : VTsByNumber) {
167182
if (!VT || !VT->getValueAsBit("isVector"))
168183
continue;
@@ -172,6 +187,7 @@ void VTEmitter::run(raw_ostream &OS) {
172187
OS << " GET_VT_VECATTR("
173188
<< VT->getValueAsString("LLVMName") << ", "
174189
<< VT->getValueAsBit("isScalable") << ", "
190+
<< VT->getValueAsBit("isRISCVVecTuple") << ", "
175191
<< VT->getValueAsInt("nElem") << ", "
176192
<< ElTy->getName() << ")\n";
177193
// clang-format on

0 commit comments

Comments
 (0)