Skip to content

Commit ae65e2a

Browse files
committed
Mask and length never needs to be promoted since this is required to be legal
when the node is constructed. SelectionDAGBuilder handles that by calling TLI.getVPExplicitVectorLengthTy().
1 parent 5db1c08 commit ae65e2a

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2403,24 +2403,11 @@ SDValue DAGTypeLegalizer::PromoteIntOp_STORE(StoreSDNode *N, unsigned OpNo){
24032403

24042404
SDValue DAGTypeLegalizer::PromoteIntOp_VP_STORE(VPStoreSDNode *N,
24052405
unsigned OpNo) {
2406-
SDValue DataOp = N->getValue();
2407-
SDValue Operand = N->getOperand(OpNo);
2408-
2409-
if (OpNo >= 4) {
2410-
// The Mask or EVL. Update in place.
2411-
EVT DataVT = DataOp.getValueType();
2412-
SDValue PromotedOperand = OpNo == 4 ? PromoteTargetBoolean(Operand, DataVT)
2413-
: ZExtPromotedInteger(Operand);
2414-
SmallVector<SDValue, 6> NewOps(N->op_begin(), N->op_end());
2415-
NewOps[OpNo] = PromotedOperand;
2416-
return SDValue(DAG.UpdateNodeOperands(N, NewOps), 0);
2417-
}
24182406

24192407
assert(OpNo == 1 && "Unexpected operand for promotion");
2420-
DataOp = GetPromotedInteger(DataOp);
2421-
24222408
assert(!N->isIndexed() && "expecting unindexed vp_store!");
24232409

2410+
SDValue DataOp = GetPromotedInteger(N->getValue());
24242411
return DAG.getTruncStoreVP(N->getChain(), SDLoc(N), DataOp, N->getBasePtr(),
24252412
N->getMask(), N->getVectorLength(),
24262413
N->getMemoryVT(), N->getMemOperand(),

0 commit comments

Comments
 (0)