[llvm] [RISCV] Handle zeroinitializer of vector tuple Type (PR #113995)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 10:00:44 PDT 2024
================
@@ -1900,6 +1900,13 @@ 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::SPLAT_VECTOR, getCurSDLoc(), VT,
+ DAG.getConstant(0, getCurSDLoc(), MVT::getIntegerVT(8)));
----------------
lukel97 wrote:
I'm not familiar with the RVV tuple types, but is it possible to create a SPLAT_VECTOR with a wide vector type and then perform a bitcast if that's easier?
https://github.com/llvm/llvm-project/pull/113995
More information about the llvm-commits
mailing list