[llvm] [RISCV] Handle zeroinitializer of vector tuple Type (PR #113995)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 21:55:55 PST 2024
================
@@ -1896,6 +1896,17 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value *V) {
DAG.getConstant(0, getCurSDLoc(), MVT::nxv16i1));
}
+ if (VT.isRISCVVectorTuple()) {
+ assert(C->isNullValue() && "Can only zero this target type!");
+ return NodeMap[V] = DAG.getNode(
+ ISD::BITCAST, getCurSDLoc(), VT,
+ DAG.getNode(
+ ISD::SPLAT_VECTOR, getCurSDLoc(),
+ MVT::getScalableVectorVT(
+ MVT::i8, VT.getSizeInBits().getKnownMinValue() / 8),
----------------
topperc wrote:
You should use EVT::getScalableVectorVT not MVT::getScalableVectorVT
https://github.com/llvm/llvm-project/pull/113995
More information about the llvm-commits
mailing list