diff options
author | Francesco Petrogalli <francesco.petrogalli@apple.com> | 2023-11-29 12:56:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 12:56:30 +0100 |
commit | 241076fb529eafccea9bae8bb407a57d83480745 (patch) | |
tree | 636cd213a88063d3994ffff9589452df425ba9d4 | |
parent | 47df664c7acfd8abd082c0252d1793182c92dc3d (diff) | |
download | llvm-241076fb529eafccea9bae8bb407a57d83480745.zip llvm-241076fb529eafccea9bae8bb407a57d83480745.tar.gz llvm-241076fb529eafccea9bae8bb407a57d83480745.tar.bz2 |
[SelectionDAG] Fix assertion for widening of mask operand in MSTORE. (#73295)
According to the code in `SelectionDAG::getMaskedStore`, the Mask
operator is in position 4, not 3:
SDValue Ops[] = {Chain, Val, Base, Offset, Mask};
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index e24f514..66461b2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -6582,7 +6582,7 @@ SDValue DAGTypeLegalizer::WidenVecOp_VP_STRIDED_STORE(SDNode *N, } SDValue DAGTypeLegalizer::WidenVecOp_MSTORE(SDNode *N, unsigned OpNo) { - assert((OpNo == 1 || OpNo == 3) && + assert((OpNo == 1 || OpNo == 4) && "Can widen only data or mask operand of mstore"); MaskedStoreSDNode *MST = cast<MaskedStoreSDNode>(N); SDValue Mask = MST->getMask(); |