diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index 59a9dced6cf0..1fd171c24a6f 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -7216,8 +7216,7 @@ SDValue DAGTypeLegalizer::WidenVecOp_STORE(SDNode *N) { SDValue EVL = DAG.getElementCount(DL, TLI.getVPExplicitVectorLengthTy(), StVT.getVectorElementCount()); return DAG.getStoreVP(ST->getChain(), DL, StVal, ST->getBasePtr(), - DAG.getUNDEF(ST->getBasePtr().getValueType()), Mask, - EVL, StVT, ST->getMemOperand(), + ST->getOffset(), Mask, EVL, StVT, ST->getMemOperand(), ST->getAddressingMode()); }