mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-14 14:56:47 +00:00
[VE] Fix breakage after D118981
VE backend code expected all VP SDNode to have a mask parameter. This is not the case with vp.select|merge after D118981.
This commit is contained in:
parent
75044e9b4f
commit
de42307e44
@ -2710,17 +2710,21 @@ SDValue VETargetLowering::lowerToVVP(SDValue Op, SelectionDAG &DAG) const {
|
||||
|
||||
if (FromVP) {
|
||||
// All upstream VP SDNodes always have a mask and avl.
|
||||
auto MaskIdx = ISD::getVPMaskIdx(Opcode).getValue();
|
||||
auto AVLIdx = ISD::getVPExplicitVectorLengthIdx(Opcode).getValue();
|
||||
Mask = Op->getOperand(MaskIdx);
|
||||
AVL = Op->getOperand(AVLIdx);
|
||||
auto MaskIdx = ISD::getVPMaskIdx(Opcode);
|
||||
auto AVLIdx = ISD::getVPExplicitVectorLengthIdx(Opcode);
|
||||
if (MaskIdx)
|
||||
Mask = Op->getOperand(*MaskIdx);
|
||||
if (AVLIdx)
|
||||
AVL = Op->getOperand(*AVLIdx);
|
||||
|
||||
} else {
|
||||
// Materialize the VL parameter.
|
||||
AVL = CDAG.getConstant(OpVecVT.getVectorNumElements(), MVT::i32);
|
||||
Mask = CDAG.getConstantMask(Packing, true);
|
||||
}
|
||||
|
||||
// Materialize default mask and avl.
|
||||
if (!AVL)
|
||||
AVL = CDAG.getConstant(OpVecVT.getVectorNumElements(), MVT::i32);
|
||||
if (!Mask)
|
||||
Mask = CDAG.getConstantMask(Packing, true);
|
||||
|
||||
if (isVVPBinaryOp(VVPOpcode)) {
|
||||
assert(LegalVecVT.isSimple());
|
||||
return CDAG.getNode(VVPOpcode, LegalVecVT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user