1 //===--- HexagonMapAsm2IntrinV62.gen.td -----------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 multiclass T_VR_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
10 def: Pat<(IntID HvxVR:$src1, IntRegs:$src2),
11 (MI HvxVR:$src1, IntRegs:$src2)>;
12 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxVR:$src1, IntRegs:$src2),
13 (MI HvxVR:$src1, IntRegs:$src2)>;
16 multiclass T_VVL_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
17 def: Pat<(IntID HvxVR:$src1, HvxVR:$src2, IntRegsLow8:$src3),
18 (MI HvxVR:$src1, HvxVR:$src2, IntRegsLow8:$src3)>;
19 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxVR:$src1, HvxVR:$src2,
21 (MI HvxVR:$src1, HvxVR:$src2, IntRegsLow8:$src3)>;
24 multiclass T_VV_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
25 def: Pat<(IntID HvxVR:$src1, HvxVR:$src2),
26 (MI HvxVR:$src1, HvxVR:$src2)>;
27 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxVR:$src1, HvxVR:$src2),
28 (MI HvxVR:$src1, HvxVR:$src2)>;
31 multiclass T_WW_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
32 def: Pat<(IntID HvxWR:$src1, HvxWR:$src2),
33 (MI HvxWR:$src1, HvxWR:$src2)>;
34 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxWR:$src1, HvxWR:$src2),
35 (MI HvxWR:$src1, HvxWR:$src2)>;
38 multiclass T_WVV_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
39 def: Pat<(IntID HvxWR:$src1, HvxVR:$src2, HvxVR:$src3),
40 (MI HvxWR:$src1, HvxVR:$src2, HvxVR:$src3)>;
41 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxWR:$src1, HvxVR:$src2,
43 (MI HvxWR:$src1, HvxVR:$src2, HvxVR:$src3)>;
46 multiclass T_WR_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
47 def: Pat<(IntID HvxWR:$src1, IntRegs:$src2),
48 (MI HvxWR:$src1, IntRegs:$src2)>;
49 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxWR:$src1, IntRegs:$src2),
50 (MI HvxWR:$src1, IntRegs:$src2)>;
53 multiclass T_WWR_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
54 def: Pat<(IntID HvxWR:$src1, HvxWR:$src2, IntRegs:$src3),
55 (MI HvxWR:$src1, HvxWR:$src2, IntRegs:$src3)>;
56 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxWR:$src1, HvxWR:$src2,
58 (MI HvxWR:$src1, HvxWR:$src2, IntRegs:$src3)>;
61 multiclass T_VVR_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
62 def: Pat<(IntID HvxVR:$src1, HvxVR:$src2, IntRegs:$src3),
63 (MI HvxVR:$src1, HvxVR:$src2, IntRegs:$src3)>;
64 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxVR:$src1, HvxVR:$src2,
66 (MI HvxVR:$src1, HvxVR:$src2, IntRegs:$src3)>;
69 multiclass T_ZR_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
70 def: Pat<(IntID HvxQR:$src1, IntRegs:$src2),
71 (MI HvxQR:$src1, IntRegs:$src2)>;
72 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxQR:$src1, IntRegs:$src2),
73 (MI HvxQR:$src1, IntRegs:$src2)>;
76 multiclass T_VZR_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
77 def: Pat<(IntID HvxVR:$src1, HvxQR:$src2, IntRegs:$src3),
78 (MI HvxVR:$src1, HvxQR:$src2, IntRegs:$src3)>;
79 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxVR:$src1, HvxQR:$src2,
81 (MI HvxVR:$src1, HvxQR:$src2, IntRegs:$src3)>;
84 multiclass T_ZV_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
85 def: Pat<(IntID HvxQR:$src1, HvxVR:$src2),
86 (MI HvxQR:$src1, HvxVR:$src2)>;
87 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxQR:$src1, HvxVR:$src2),
88 (MI HvxQR:$src1, HvxVR:$src2)>;
91 multiclass T_R_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
92 def: Pat<(IntID IntRegs:$src1),
94 def: Pat<(!cast<Intrinsic>(IntID#"_128B") IntRegs:$src1),
98 multiclass T_ZZ_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
99 def: Pat<(IntID HvxQR:$src1, HvxQR:$src2),
100 (MI HvxQR:$src1, HvxQR:$src2)>;
101 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxQR:$src1, HvxQR:$src2),
102 (MI HvxQR:$src1, HvxQR:$src2)>;
105 multiclass T_VVI_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
106 def: Pat<(IntID HvxVR:$src1, HvxVR:$src2, imm:$src3),
107 (MI HvxVR:$src1, HvxVR:$src2, imm:$src3)>;
108 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxVR:$src1, HvxVR:$src2,
110 (MI HvxVR:$src1, HvxVR:$src2, imm:$src3)>;
113 multiclass T_VVVI_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
114 def: Pat<(IntID HvxVR:$src1, HvxVR:$src2, HvxVR:$src3, imm:$src4),
115 (MI HvxVR:$src1, HvxVR:$src2, HvxVR:$src3, imm:$src4)>;
116 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxVR:$src1, HvxVR:$src2,
117 HvxVR:$src3, imm:$src4),
118 (MI HvxVR:$src1, HvxVR:$src2, HvxVR:$src3, imm:$src4)>;
121 multiclass T_WVVI_HVX_gen_pat <InstHexagon MI, Intrinsic IntID> {
122 def: Pat<(IntID HvxWR:$src1, HvxVR:$src2, HvxVR:$src3, imm:$src4),
123 (MI HvxWR:$src1, HvxVR:$src2, HvxVR:$src3, imm:$src4)>;
124 def: Pat<(!cast<Intrinsic>(IntID#"_128B") HvxWR:$src1, HvxVR:$src2,
125 HvxVR:$src3, imm:$src4),
126 (MI HvxWR:$src1, HvxVR:$src2, HvxVR:$src3, imm:$src4)>;
129 def : T_R_pat <S6_vsplatrbp, int_hexagon_S6_vsplatrbp>;
130 def : T_PP_pat <M6_vabsdiffb, int_hexagon_M6_vabsdiffb>;
131 def : T_PP_pat <M6_vabsdiffub, int_hexagon_M6_vabsdiffub>;
132 def : T_PP_pat <S6_vtrunehb_ppp, int_hexagon_S6_vtrunehb_ppp>;
133 def : T_PP_pat <S6_vtrunohb_ppp, int_hexagon_S6_vtrunohb_ppp>;
135 defm : T_VR_HVX_gen_pat <V6_vlsrb, int_hexagon_V6_vlsrb>;
136 defm : T_VR_HVX_gen_pat <V6_vmpyiwub, int_hexagon_V6_vmpyiwub>;
137 defm : T_VVL_HVX_gen_pat <V6_vasrwuhrndsat, int_hexagon_V6_vasrwuhrndsat>;
138 defm : T_VVL_HVX_gen_pat <V6_vasruwuhrndsat, int_hexagon_V6_vasruwuhrndsat>;
139 defm : T_VVL_HVX_gen_pat <V6_vasrhbsat, int_hexagon_V6_vasrhbsat>;
140 defm : T_VVL_HVX_gen_pat <V6_vlutvvb_nm, int_hexagon_V6_vlutvvb_nm>;
141 defm : T_VVL_HVX_gen_pat <V6_vlutvwh_nm, int_hexagon_V6_vlutvwh_nm>;
142 defm : T_VV_HVX_gen_pat <V6_vrounduwuh, int_hexagon_V6_vrounduwuh>;
143 defm : T_VV_HVX_gen_pat <V6_vrounduhub, int_hexagon_V6_vrounduhub>;
144 defm : T_VV_HVX_gen_pat <V6_vadduwsat, int_hexagon_V6_vadduwsat>;
145 defm : T_VV_HVX_gen_pat <V6_vsubuwsat, int_hexagon_V6_vsubuwsat>;
146 defm : T_VV_HVX_gen_pat <V6_vaddbsat, int_hexagon_V6_vaddbsat>;
147 defm : T_VV_HVX_gen_pat <V6_vsubbsat, int_hexagon_V6_vsubbsat>;
148 defm : T_VV_HVX_gen_pat <V6_vaddububb_sat, int_hexagon_V6_vaddububb_sat>;
149 defm : T_VV_HVX_gen_pat <V6_vsubububb_sat, int_hexagon_V6_vsubububb_sat>;
150 defm : T_VV_HVX_gen_pat <V6_vmpyewuh_64, int_hexagon_V6_vmpyewuh_64>;
151 defm : T_VV_HVX_gen_pat <V6_vmaxb, int_hexagon_V6_vmaxb>;
152 defm : T_VV_HVX_gen_pat <V6_vminb, int_hexagon_V6_vminb>;
153 defm : T_VV_HVX_gen_pat <V6_vsatuwuh, int_hexagon_V6_vsatuwuh>;
154 defm : T_VV_HVX_gen_pat <V6_vaddclbw, int_hexagon_V6_vaddclbw>;
155 defm : T_VV_HVX_gen_pat <V6_vaddclbh, int_hexagon_V6_vaddclbh>;
156 defm : T_WW_HVX_gen_pat <V6_vadduwsat_dv, int_hexagon_V6_vadduwsat_dv>;
157 defm : T_WW_HVX_gen_pat <V6_vsubuwsat_dv, int_hexagon_V6_vsubuwsat_dv>;
158 defm : T_WW_HVX_gen_pat <V6_vaddbsat_dv, int_hexagon_V6_vaddbsat_dv>;
159 defm : T_WW_HVX_gen_pat <V6_vsubbsat_dv, int_hexagon_V6_vsubbsat_dv>;
160 defm : T_WVV_HVX_gen_pat <V6_vaddhw_acc, int_hexagon_V6_vaddhw_acc>;
161 defm : T_WVV_HVX_gen_pat <V6_vadduhw_acc, int_hexagon_V6_vadduhw_acc>;
162 defm : T_WVV_HVX_gen_pat <V6_vaddubh_acc, int_hexagon_V6_vaddubh_acc>;
163 defm : T_WVV_HVX_gen_pat <V6_vmpyowh_64_acc, int_hexagon_V6_vmpyowh_64_acc>;
164 defm : T_WR_HVX_gen_pat <V6_vmpauhb, int_hexagon_V6_vmpauhb>;
165 defm : T_WWR_HVX_gen_pat <V6_vmpauhb_acc, int_hexagon_V6_vmpauhb_acc>;
166 defm : T_VVR_HVX_gen_pat <V6_vmpyiwub_acc, int_hexagon_V6_vmpyiwub_acc>;
167 defm : T_ZR_HVX_gen_pat <V6_vandnqrt, int_hexagon_V6_vandnqrt>;
168 defm : T_VZR_HVX_gen_pat <V6_vandnqrt_acc, int_hexagon_V6_vandnqrt_acc>;
169 defm : T_ZV_HVX_gen_pat <V6_vandvqv, int_hexagon_V6_vandvqv>;
170 defm : T_ZV_HVX_gen_pat <V6_vandvnqv, int_hexagon_V6_vandvnqv>;
171 defm : T_R_HVX_gen_pat <V6_pred_scalar2v2, int_hexagon_V6_pred_scalar2v2>;
172 defm : T_R_HVX_gen_pat <V6_lvsplath, int_hexagon_V6_lvsplath>;
173 defm : T_R_HVX_gen_pat <V6_lvsplatb, int_hexagon_V6_lvsplatb>;
174 defm : T_ZZ_HVX_gen_pat <V6_shuffeqw, int_hexagon_V6_shuffeqw>;
175 defm : T_ZZ_HVX_gen_pat <V6_shuffeqh, int_hexagon_V6_shuffeqh>;
176 defm : T_VVI_HVX_gen_pat <V6_vlutvvbi, int_hexagon_V6_vlutvvbi>;
177 defm : T_VVI_HVX_gen_pat <V6_vlutvwhi, int_hexagon_V6_vlutvwhi>;
178 defm : T_VVVI_HVX_gen_pat <V6_vlutvvb_oracci, int_hexagon_V6_vlutvvb_oracci>;
179 defm : T_WVVI_HVX_gen_pat <V6_vlutvwh_oracci, int_hexagon_V6_vlutvwh_oracci>;