Skip to content

Commit 495edec

Browse files
committed
fixup! [RISCV] Change vector tuple type's TypeSize to scalable
1 parent 96d06d5 commit 495edec

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

llvm/include/llvm/CodeGenTypes/MachineValueType.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,13 @@ namespace llvm {
306306
/// be set and the runtime size will be a positive integer multiple of the
307307
/// base size.
308308
TypeSize getSizeInBits() const {
309-
// clang-format off
310309
static constexpr TypeSize SizeTable[] = {
311310
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, Tup, NF, NElem, EltTy) \
312-
TypeSize(Sz, Sc || Tup || Ty == aarch64svcount /* FIXME: Not in the td. */),
311+
TypeSize(Sz, Sc || Tup || Ty == aarch64svcount /* FIXME: Not in the td. \
312+
*/),
313313
#include "llvm/CodeGen/GenVT.inc"
314314
#undef GET_VT_ATTR
315315
};
316-
// clang-format on
317316

318317
switch (SimpleTy) {
319318
case INVALID_SIMPLE_VALUE_TYPE:

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21311,6 +21311,7 @@ bool RISCVTargetLowering::splitValueIntoRegisterParts(
2131121311
}
2131221312

2131321313
if (ValueVT.isRISCVVectorTuple() && PartVT.isRISCVVectorTuple()) {
21314+
#ifndef NDEBUG
2131421315
unsigned ValNF = ValueVT.getRISCVVectorTupleNumFields();
2131521316
[[maybe_unused]] unsigned ValLMUL =
2131621317
divideCeil(ValueVT.getSizeInBits().getKnownMinValue(),
@@ -21322,6 +21323,7 @@ bool RISCVTargetLowering::splitValueIntoRegisterParts(
2132221323
assert(ValNF == PartNF && ValLMUL == PartLMUL &&
2132321324
"RISC-V vector tuple type only accepts same register class type "
2132421325
"TUPLE_INSERT");
21326+
#endif
2132521327

2132621328
Val = DAG.getNode(RISCVISD::TUPLE_INSERT, DL, PartVT, DAG.getUNDEF(PartVT),
2132721329
Val, DAG.getVectorIdxConstant(0, DL));

0 commit comments

Comments
 (0)