[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
================
@@ -66,6 +66,25 @@ void RISCVDAGToDAGISel::PreprocessISelDAG() {
VT.isInteger() ? RISCVISD::VMV_V_X_VL : RISCVISD::VFMV_V_F_VL;
SDLoc DL(N);
SDValue VL = CurDAG->getRegister(RISCV::X0, Subtarget->getXLenVT());
+
+ if (VT.isRISCVVectorTuple()) {
+ unsigned NF = VT.getRISCVVectorTupleNumFields();
+ unsigned NumScalElts = VT.getSizeInBits() / (NF * 8);
+ SDValue EltVal = CurDAG->getConstant(0, DL, Subtarget->getXLenVT());
----------------
lukel97 wrote:
Should we use N->getOperand(0) instead and assert that it's zero, just to be safe?
https://github.com/llvm/llvm-project/pull/113995
More information about the llvm-commits
mailing list