From 0a42db682aa01a66eb99d08063fbc6e6124792f7 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 21 May 2025 17:13:30 -0700 Subject: [PATCH] [SelectionDAG] Simplify creation of getStoreVP in WidenVecOp_STORE. NFC We can use the offset from the original store instead of creating a new undef offset. We didn't check if the offset was undef already so we really shouldn't drop it if it isn't. --- llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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()); }