@@ -854,16 +854,31 @@ multiclass VPseudoTernary<VReg RetClass,
854
854
}
855
855
}
856
856
857
+ multiclass VPseudoTernaryV_VV<string Constraint = ""> {
858
+ foreach m = MxList.m in
859
+ defm _VV : VPseudoTernary<m.vrclass, m.vrclass, m.vrclass, m, Constraint>;
860
+ }
861
+
857
862
multiclass VPseudoTernaryV_VX<string Constraint = ""> {
858
863
foreach m = MxList.m in
859
864
defm _VX : VPseudoTernary<m.vrclass, m.vrclass, GPR, m, Constraint>;
860
865
}
861
866
867
+ multiclass VPseudoTernaryV_VX_AAXA<string Constraint = ""> {
868
+ foreach m = MxList.m in
869
+ defm _VX : VPseudoTernary<m.vrclass, GPR, m.vrclass, m, Constraint>;
870
+ }
871
+
862
872
multiclass VPseudoTernaryV_VI<Operand ImmType = simm5, string Constraint = ""> {
863
873
foreach m = MxList.m in
864
874
defm _VI : VPseudoTernary<m.vrclass, m.vrclass, ImmType, m, Constraint>;
865
875
}
866
876
877
+ multiclass VPseudoTernaryV_VV_VX_AAXA<string Constraint = ""> {
878
+ defm "" : VPseudoTernaryV_VV<Constraint>;
879
+ defm "" : VPseudoTernaryV_VX_AAXA<Constraint>;
880
+ }
881
+
867
882
multiclass VPseudoTernaryV_VX_VI<Operand ImmType = simm5, string Constraint = ""> {
868
883
defm "" : VPseudoTernaryV_VX<Constraint>;
869
884
defm "" : VPseudoTernaryV_VI<ImmType, Constraint>;
@@ -1475,6 +1490,15 @@ multiclass VPatTernary<string intrinsic,
1475
1490
op2_kind>;
1476
1491
}
1477
1492
1493
+ multiclass VPatTernaryV_VV<string intrinsic, string instruction,
1494
+ list<VTypeInfo> vtilist> {
1495
+ foreach vti = vtilist in
1496
+ defm : VPatTernary<intrinsic, instruction, "VV",
1497
+ vti.Vector, vti.Vector, vti.Vector, vti.Mask,
1498
+ vti.SEW, vti.LMul, vti.RegClass,
1499
+ vti.RegClass, vti.RegClass>;
1500
+ }
1501
+
1478
1502
multiclass VPatTernaryV_VX<string intrinsic, string instruction,
1479
1503
list<VTypeInfo> vtilist> {
1480
1504
foreach vti = vtilist in
@@ -1484,6 +1508,15 @@ multiclass VPatTernaryV_VX<string intrinsic, string instruction,
1484
1508
vti.RegClass, GPR>;
1485
1509
}
1486
1510
1511
+ multiclass VPatTernaryV_VX_AAXA<string intrinsic, string instruction,
1512
+ list<VTypeInfo> vtilist> {
1513
+ foreach vti = vtilist in
1514
+ defm : VPatTernary<intrinsic, instruction, "VX",
1515
+ vti.Vector, vti.Scalar, vti.Vector, vti.Mask,
1516
+ vti.SEW, vti.LMul, vti.RegClass,
1517
+ vti.ScalarRegClass, vti.RegClass>;
1518
+ }
1519
+
1487
1520
multiclass VPatTernaryV_VI<string intrinsic, string instruction,
1488
1521
list<VTypeInfo> vtilist, Operand Imm_type> {
1489
1522
foreach vti = vtilist in
@@ -1493,6 +1526,12 @@ multiclass VPatTernaryV_VI<string intrinsic, string instruction,
1493
1526
vti.RegClass, Imm_type>;
1494
1527
}
1495
1528
1529
+ multiclass VPatTernaryV_VV_VX_AAXA<string intrinsic, string instruction,
1530
+ list<VTypeInfo> vtilist> {
1531
+ defm "" : VPatTernaryV_VV<intrinsic, instruction, vtilist>;
1532
+ defm "" : VPatTernaryV_VX_AAXA<intrinsic, instruction, vtilist>;
1533
+ }
1534
+
1496
1535
multiclass VPatTernaryV_VX_VI<string intrinsic, string instruction,
1497
1536
list<VTypeInfo> vtilist, Operand Imm_type = simm5> {
1498
1537
defm "" : VPatTernaryV_VX<intrinsic, instruction, vtilist>;
@@ -1649,6 +1688,14 @@ defm PseudoVWMUL : VPseudoBinaryW_VV_VX;
1649
1688
defm PseudoVWMULU : VPseudoBinaryW_VV_VX;
1650
1689
defm PseudoVWMULSU : VPseudoBinaryW_VV_VX;
1651
1690
1691
+ //===----------------------------------------------------------------------===//
1692
+ // 12.13. Vector Single-Width Integer Multiply-Add Instructions
1693
+ //===----------------------------------------------------------------------===//
1694
+ defm PseudoVMACC : VPseudoTernaryV_VV_VX_AAXA;
1695
+ defm PseudoVNMSAC : VPseudoTernaryV_VV_VX_AAXA;
1696
+ defm PseudoVMADD : VPseudoTernaryV_VV_VX_AAXA;
1697
+ defm PseudoVNMSUB : VPseudoTernaryV_VV_VX_AAXA;
1698
+
1652
1699
//===----------------------------------------------------------------------===//
1653
1700
// 12.17. Vector Integer Move Instructions
1654
1701
//===----------------------------------------------------------------------===//
@@ -1975,6 +2022,14 @@ defm "" : VPatBinaryW_VV_VX<"int_riscv_vwmul", "PseudoVWMUL", AllWidenableIntVec
1975
2022
defm "" : VPatBinaryW_VV_VX<"int_riscv_vwmulu", "PseudoVWMULU", AllWidenableIntVectors>;
1976
2023
defm "" : VPatBinaryW_VV_VX<"int_riscv_vwmulsu", "PseudoVWMULSU", AllWidenableIntVectors>;
1977
2024
2025
+ //===----------------------------------------------------------------------===//
2026
+ // 12.13. Vector Single-Width Integer Multiply-Add Instructions
2027
+ //===----------------------------------------------------------------------===//
2028
+ defm "" : VPatTernaryV_VV_VX_AAXA<"int_riscv_vmadd", "PseudoVMADD", AllIntegerVectors>;
2029
+ defm "" : VPatTernaryV_VV_VX_AAXA<"int_riscv_vnmsub", "PseudoVNMSUB", AllIntegerVectors>;
2030
+ defm "" : VPatTernaryV_VV_VX_AAXA<"int_riscv_vmacc", "PseudoVMACC", AllIntegerVectors>;
2031
+ defm "" : VPatTernaryV_VV_VX_AAXA<"int_riscv_vnmsac", "PseudoVNMSAC", AllIntegerVectors>;
2032
+
1978
2033
//===----------------------------------------------------------------------===//
1979
2034
// 12.17. Vector Integer Move Instructions
1980
2035
//===----------------------------------------------------------------------===//
0 commit comments