Skip to content

Commit

Permalink
remove scalable build vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmaitland committed Nov 7, 2023
1 parent abd6030 commit 3c2eaf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ static void buildCopyFromRegs(MachineIRBuilder &B, ArrayRef<Register> OrigRegs,
} else {
// Vector was split, and elements promoted to a wider type.
// FIXME: Should handle floating point promotions.
LLT BVType = LLT::vector(LLTy.getElementCount(), PartLLT);
LLT BVType = LLT::fixed_vector(LLTy.getNumElements(), PartLLT);
auto BV = B.buildBuildVector(BVType, Regs);
B.buildTrunc(OrigRegs[0], BV);
}
Expand Down
17 changes: 4 additions & 13 deletions llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,19 +1281,10 @@ MachineIRBuilder::buildInstr(unsigned Opc, ArrayRef<DstOp> DstOps,
SrcOps[0].getLLTTy(*getMRI());
}) &&
"type mismatch in input list");
if (DstOps[0].getLLTTy(*getMRI()).isScalable())
assert((TypeSize::ScalarTy)SrcOps.size() *
SrcOps[0].getLLTTy(*getMRI()).getSizeInBits() >=
DstOps[0]
.getLLTTy(*getMRI())
.getSizeInBits()
.getKnownMinValue() &&
"input scalars does not cover the output vector register");
else
assert((TypeSize::ScalarTy)SrcOps.size() *
SrcOps[0].getLLTTy(*getMRI()).getSizeInBits() ==
DstOps[0].getLLTTy(*getMRI()).getSizeInBits() &&
"input scalars do not exactly cover the output vector register");
assert((TypeSize::ScalarTy)SrcOps.size() *
SrcOps[0].getLLTTy(*getMRI()).getSizeInBits() ==
DstOps[0].getLLTTy(*getMRI()).getSizeInBits() &&
"input scalars do not exactly cover the output vector register");
break;
}
case TargetOpcode::G_BUILD_VECTOR_TRUNC: {
Expand Down

0 comments on commit 3c2eaf7

Please sign in to comment.