diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 5a5596a542f72..cac25fd7c1025 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -1855,7 +1855,7 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value *V) { if (isa(CDS->getType())) return DAG.getMergeValues(Ops, getCurSDLoc()); - return NodeMap[V] = DAG.getBuildVector(VT, getCurSDLoc(), Ops); + return DAG.getBuildVector(VT, getCurSDLoc(), Ops); } if (C->getType()->isStructTy() || C->getType()->isArrayTy()) { @@ -1898,14 +1898,13 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value *V) { 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(), - EVT::getVectorVT(*DAG.getContext(), MVT::i8, - VT.getSizeInBits().getKnownMinValue() / 8, - true), - DAG.getConstant(0, getCurSDLoc(), MVT::getIntegerVT(8)))); + return DAG.getNode( + ISD::BITCAST, getCurSDLoc(), VT, + DAG.getNode( + ISD::SPLAT_VECTOR, getCurSDLoc(), + EVT::getVectorVT(*DAG.getContext(), MVT::i8, + VT.getSizeInBits().getKnownMinValue() / 8, true), + DAG.getConstant(0, getCurSDLoc(), MVT::getIntegerVT(8)))); } VectorType *VecTy = cast(V->getType()); @@ -1918,7 +1917,7 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value *V) { for (unsigned i = 0; i != NumElements; ++i) Ops.push_back(getValue(CV->getOperand(i))); - return NodeMap[V] = DAG.getBuildVector(VT, getCurSDLoc(), Ops); + return DAG.getBuildVector(VT, getCurSDLoc(), Ops); } if (isa(C)) { @@ -1931,7 +1930,7 @@ SDValue SelectionDAGBuilder::getValueImpl(const Value *V) { else Op = DAG.getConstant(0, getCurSDLoc(), EltVT); - return NodeMap[V] = DAG.getSplat(VT, getCurSDLoc(), Op); + return DAG.getSplat(VT, getCurSDLoc(), Op); } llvm_unreachable("Unknown vector constant");