@@ -2089,6 +2089,21 @@ multiclass XVPseudoVWMAC_VX {
2089
2089
}
2090
2090
}
2091
2091
2092
+ multiclass XVPseudoVSMUL_VV_VX {
2093
+ foreach m = MxListXTHeadV in {
2094
+ defvar mx = m.MX;
2095
+ defvar WriteVSIMulV_MX = !cast<SchedWrite>("WriteVSMulV_" # mx);
2096
+ defvar WriteVSIMulX_MX = !cast<SchedWrite>("WriteVSMulX_" # mx);
2097
+ defvar ReadVSIMulV_MX = !cast<SchedRead>("ReadVSMulV_" # mx);
2098
+ defvar ReadVSIMulX_MX = !cast<SchedRead>("ReadVSMulX_" # mx);
2099
+
2100
+ defm "" : XVPseudoBinaryV_VV<m>,
2101
+ Sched<[WriteVSIMulV_MX, ReadVSIMulV_MX, ReadVSIMulV_MX, ReadVMask]>;
2102
+ defm "" : XVPseudoBinaryV_VX<m>,
2103
+ Sched<[WriteVSIMulX_MX, ReadVSIMulV_MX, ReadVSIMulX_MX, ReadVMask]>;
2104
+ }
2105
+ }
2106
+
2092
2107
//===----------------------------------------------------------------------===//
2093
2108
// Helpers to define the intrinsic patterns for the XTHeadVector extension.
2094
2109
//===----------------------------------------------------------------------===//
@@ -3020,4 +3035,18 @@ let Predicates = [HasVendorXTHeadV] in {
3020
3035
}
3021
3036
} // Predicates = [HasVendorXTHeadV]
3022
3037
3023
- include "RISCVInstrInfoXTHeadVVLPatterns.td"
3038
+ //===----------------------------------------------------------------------===//
3039
+ // 13.3. Vector Single-Width Fractional Multiply with Rounding and
3040
+ // Saturation Instructions
3041
+ //===----------------------------------------------------------------------===//
3042
+
3043
+ let Predicates = [HasVendorXTHeadV] in {
3044
+ defm PseudoTH_VSMUL : XVPseudoVSMUL_VV_VX;
3045
+ } // Predicates = [HasVendorXTHeadV]
3046
+
3047
+ let Predicates = [HasVendorXTHeadV] in {
3048
+ defm : XVPatBinaryV_VV_VX<"int_riscv_th_vsmul", "PseudoTH_VSMUL", AllIntegerXVectors>;
3049
+ // defm : XVPatBinaryV_VV_VX<"int_riscv_th_vsmul", "PseudoTH_VSMUL", AllIntegerXVectors, isSEWAware=1>;
3050
+ } // Predicates = [HasVendorXTHeadV]
3051
+
3052
+ include "RISCVInstrInfoXTHeadVVLPatterns.td"
0 commit comments