Skip to content

Commit 6a57363

Browse files
toppercJaddyen
authored andcommitted
[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.
1 parent 2b500ca commit 6a57363

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7216,8 +7216,7 @@ SDValue DAGTypeLegalizer::WidenVecOp_STORE(SDNode *N) {
72167216
SDValue EVL = DAG.getElementCount(DL, TLI.getVPExplicitVectorLengthTy(),
72177217
StVT.getVectorElementCount());
72187218
return DAG.getStoreVP(ST->getChain(), DL, StVal, ST->getBasePtr(),
7219-
DAG.getUNDEF(ST->getBasePtr().getValueType()), Mask,
7220-
EVL, StVT, ST->getMemOperand(),
7219+
ST->getOffset(), Mask, EVL, StVT, ST->getMemOperand(),
72217220
ST->getAddressingMode());
72227221
}
72237222

0 commit comments

Comments
 (0)