================
@@ -2236,51 +2268,51 @@ void
AArch64DAGToDAGISel::SelectMultiVectorLutiLane(SDNode *Node,
if (!ImmToReg<AArch64::ZT0, 0>(Node->getOperand(2), ZtValue))
return;
- SDValue Chain = Node->getOperand(0);
- SDValue Ops[] = {ZtValue, Node->getOperand(3), Node->getOperand(4), Chain};
- SDLoc DL(Node);
- EVT VT = Node->getValueType(0);
-
- SDNode *Instruction =
- CurDAG->getMachineNode(Opc, DL, {MVT::Untyped, MVT::Other}, Ops);
- SDValue SuperReg = SDValue(Instruction, 0);
+ SDValue Ops[] = {ZtValue, Node->getOperand(3), Node->getOperand(4)};
+ EmitMultiVectorLutiLane(Node, NumOutVecs, Opc, Ops);
+}
- for (unsigned I = 0; I < NumOutVecs; ++I)
- ReplaceUses(SDValue(Node, I), CurDAG->getTargetExtractSubreg(
- AArch64::zsub0 + I, DL, VT, SuperReg));
+void AArch64DAGToDAGISel::SelectMultiVectorLutiLaneTuple(SDNode *Node,
+ unsigned NumOutVecs,
+ unsigned Opc,
+ uint32_t MaxImm) {
+ SDValue ImmVal = Node->getOperand(5);
+ if (auto *Imm = dyn_cast<ConstantSDNode>(ImmVal))
+ if (Imm->getZExtValue() > MaxImm)
+ return;
----------------
kmclaughlin-arm wrote:
```suggestion
auto *Imm = dyn_cast<ConstantSDNode>(Node->getOperand(5));
if (Imm && Imm->getZExtValue() > MaxImm)
return;
```
https://github.com/llvm/llvm-project/pull/187046
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits