Skip to content

Commit 241076f

Browse files
authored
[SelectionDAG] Fix assertion for widening of mask operand in MSTORE. (llvm#73295)
According to the code in `SelectionDAG::getMaskedStore`, the Mask operator is in position 4, not 3: SDValue Ops[] = {Chain, Val, Base, Offset, Mask};
1 parent 47df664 commit 241076f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6582,7 +6582,7 @@ SDValue DAGTypeLegalizer::WidenVecOp_VP_STRIDED_STORE(SDNode *N,
65826582
}
65836583

65846584
SDValue DAGTypeLegalizer::WidenVecOp_MSTORE(SDNode *N, unsigned OpNo) {
6585-
assert((OpNo == 1 || OpNo == 3) &&
6585+
assert((OpNo == 1 || OpNo == 4) &&
65866586
"Can widen only data or mask operand of mstore");
65876587
MaskedStoreSDNode *MST = cast<MaskedStoreSDNode>(N);
65886588
SDValue Mask = MST->getMask();

0 commit comments

Comments
 (0)