Skip to content

Commit 1c5f9eb

Browse files
committed
[RISCV] Remove redundant SDNode creation for same reg class value
1 parent 45f420e commit 1c5f9eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21345,18 +21345,17 @@ bool RISCVTargetLowering::splitValueIntoRegisterParts(
2134521345
}
2134621346

2134721347
if (ValueVT.isRISCVVectorTuple() && PartVT.isRISCVVectorTuple()) {
21348+
#ifndef NDEBUG
2134821349
unsigned ValNF = ValueVT.getRISCVVectorTupleNumFields();
2134921350
[[maybe_unused]] unsigned ValLMUL =
2135021351
divideCeil(ValueVT.getSizeInBits(), ValNF * RISCV::RVVBitsPerBlock);
2135121352
unsigned PartNF = PartVT.getRISCVVectorTupleNumFields();
2135221353
[[maybe_unused]] unsigned PartLMUL =
2135321354
divideCeil(PartVT.getSizeInBits(), PartNF * RISCV::RVVBitsPerBlock);
2135421355
assert(ValNF == PartNF && ValLMUL == PartLMUL &&
21355-
"RISC-V vector tuple type only accepts same register class type "
21356-
"TUPLE_INSERT");
21356+
"RISC-V vector tuple type only accepts same register class copy");
21357+
#endif
2135721358

21358-
Val = DAG.getNode(RISCVISD::TUPLE_INSERT, DL, PartVT, DAG.getUNDEF(PartVT),
21359-
Val, DAG.getVectorIdxConstant(0, DL));
2136021359
Parts[0] = Val;
2136121360
return true;
2136221361
}

0 commit comments

Comments
 (0)