[llvm] 0a42db6 - [SelectionDAG] Simplify creation of getStoreVP in WidenVecOp_STORE. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed May 21 17:46:41 PDT 2025
Author: Craig Topper
Date: 2025-05-21T17:46:08-07:00
New Revision: 0a42db682aa01a66eb99d08063fbc6e6124792f7
URL: https://github.com/llvm/llvm-project/commit/0a42db682aa01a66eb99d08063fbc6e6124792f7
DIFF: https://github.com/llvm/llvm-project/commit/0a42db682aa01a66eb99d08063fbc6e6124792f7.diff
LOG: [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.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index 59a9dced6cf03..1fd171c24a6f0 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());
}
More information about the llvm-commits
mailing list