[llvm] [RISCV] Handle zeroinitializer of vector tuple Type (PR #113995)

Brandon Wu via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 23:25:03 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)));
----------------
4vtomat wrote:

But its `TypeSize` is scalable, even it's same size, it's not the same.

https://github.com/llvm/llvm-project/pull/113995


More information about the llvm-commits mailing list