2 // Mask immediates for MMA instructions (2, 4 and 8 bits).
3 def Msk2Imm : ImmLeaf<i32, [{ return isUInt<2>(Imm); }]>;
4 def Msk4Imm : ImmLeaf<i32, [{ return isUInt<4>(Imm); }]>;
5 def Msk8Imm : ImmLeaf<i32, [{ return isUInt<8>(Imm); }]>;
7 def MMA : Predicate<"Subtarget->hasMMA()">;
10 // Multiclass definitions for MMA accumulator instructions.
11 // ----------------------------------------------------------------------------
13 // Defines 2 unmasked instructions where the xo field for acc/non-acc version
15 multiclass ACC_UM_XOEO<bits<6> opcode, bits<8> xo, dag IOL, string asmbase,
17 let Predicates = [MMA, IsNotISAFuture] in {
19 XX3Form_AT3_XAB6<opcode, !or(xo, 0x01), (outs acc:$AT), IOL,
20 !strconcat(asmbase#" ", asmstr), IIC_VecFP, []>,
21 RegConstraint<"@earlyclobber $AT">;
23 XX3Form_AT3_XAB6<opcode, xo, (outs acc:$AT), !con((ins acc:$ATi), IOL),
24 !strconcat(asmbase#"pp ", asmstr), IIC_VecFP, []>,
25 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
27 let Predicates = [MMA, IsISAFuture], isCodeGenOnly = 1 in {
29 XX3Form_AT3_XAB6<opcode, !or(xo, 0x01), (outs wacc:$AT), IOL,
30 !strconcat(asmbase#" ", asmstr), IIC_VecFP, []>,
31 RegConstraint<"@earlyclobber $AT">;
33 XX3Form_AT3_XAB6<opcode, xo, (outs wacc:$AT), !con((ins wacc:$ATi), IOL),
34 !strconcat(asmbase#"pp ", asmstr), IIC_VecFP, []>,
35 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
39 // Defines 4 instructions, masked/unmasked with masks 8, 4, 4 bits.
40 // The XO field for acc/non-acc version is even/odd.
41 multiclass ACC_UM_M844_XOEO<bits<6> opcode, bits<8> xo, dag IOL, string asmbase,
43 defm NAME : ACC_UM_XOEO<opcode, xo, IOL, asmbase, asmstr>;
44 let Predicates = [MMA, PrefixInstrs, IsNotISAFuture] in {
46 MMIRR_XX3Form_XY4P8_XAB6<
47 opcode, !or(xo, 0x01), (outs acc:$AT),
48 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u8imm:$PMSK)),
49 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK, $PMSK"),
51 RegConstraint<"@earlyclobber $AT">;
53 MMIRR_XX3Form_XY4P8_XAB6<
54 opcode, xo, (outs acc:$AT),
56 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u8imm:$PMSK))),
57 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK, $PMSK"),
59 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
61 let Predicates = [MMA, PrefixInstrs, IsISAFuture], isCodeGenOnly = 1 in {
63 MMIRR_XX3Form_XY4P8_XAB6<
64 opcode, !or(xo, 0x01), (outs wacc:$AT),
65 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u8imm:$PMSK)),
66 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK, $PMSK"),
68 RegConstraint<"@earlyclobber $AT">;
70 MMIRR_XX3Form_XY4P8_XAB6<
71 opcode, xo, (outs wacc:$AT),
73 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u8imm:$PMSK))),
74 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK, $PMSK"),
76 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
80 // Defines 4 instructions, masked/unmasked with masks 4, 4, 4 bits.
81 // The XO field for acc/non-acc version is even/odd.
82 multiclass ACC_UM_M444_XOEO<bits<6> opcode, bits<8> xo, dag IOL, string asmbase,
84 defm NAME : ACC_UM_XOEO<opcode, xo, IOL, asmbase, asmstr>;
85 let Predicates = [MMA, PrefixInstrs, IsNotISAFuture] in {
87 MMIRR_XX3Form_XYP4_XAB6<
88 opcode, !or(xo, 0x01), (outs acc:$AT),
89 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u4imm:$PMSK)),
90 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK, $PMSK"),
92 RegConstraint<"@earlyclobber $AT">;
94 MMIRR_XX3Form_XYP4_XAB6<
95 opcode, xo, (outs acc:$AT),
97 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u4imm:$PMSK))),
98 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK, $PMSK"),
100 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
102 let Predicates = [MMA, PrefixInstrs, IsISAFuture], isCodeGenOnly = 1 in {
104 MMIRR_XX3Form_XYP4_XAB6<
105 opcode, !or(xo, 0x01), (outs wacc:$AT),
106 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u4imm:$PMSK)),
107 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK, $PMSK"),
109 RegConstraint<"@earlyclobber $AT">;
111 MMIRR_XX3Form_XYP4_XAB6<
112 opcode, xo, (outs wacc:$AT),
113 !con((ins wacc:$ATi),
114 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u4imm:$PMSK))),
115 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK, $PMSK"),
117 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
121 // Defines 4 instructions, masked/unmasked with masks 2, 4, 4 bits.
122 // The XO field for acc/non-acc version is even/odd.
123 multiclass ACC_UM_M244_XOEO<bits<6> opcode, bits<8> xo, dag IOL, string asmbase,
125 defm NAME : ACC_UM_XOEO<opcode, xo, IOL, asmbase, asmstr>;
126 let Predicates = [MMA, PrefixInstrs, IsNotISAFuture] in {
128 MMIRR_XX3Form_XY4P2_XAB6<
129 opcode, !or(xo, 0x01), (outs acc:$AT),
130 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK)),
131 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK, $PMSK"),
133 RegConstraint<"@earlyclobber $AT">;
135 MMIRR_XX3Form_XY4P2_XAB6<
136 opcode, xo, (outs acc:$AT),
137 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
138 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK, $PMSK"),
140 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
142 let Predicates = [MMA, PrefixInstrs, IsISAFuture], isCodeGenOnly = 1 in {
144 MMIRR_XX3Form_XY4P2_XAB6<
145 opcode, !or(xo, 0x01), (outs wacc:$AT),
146 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK)),
147 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK, $PMSK"),
149 RegConstraint<"@earlyclobber $AT">;
151 MMIRR_XX3Form_XY4P2_XAB6<
152 opcode, xo, (outs wacc:$AT),
153 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
154 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK, $PMSK"),
156 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
160 // Defines 4 instructions, masked/unmasked with masks 2, 4, 4 bits.
161 // Upper nibble of XO field for acc/non-acc version is 0x4/0x6.
162 multiclass ACC_UM_M244_XO46<bits<6> opcode, bits<8> xo, dag IOL, string asmbase,
164 let Predicates = [MMA, IsNotISAFuture] in {
166 XX3Form_AT3_XAB6<opcode, xo, (outs acc:$AT), IOL,
167 !strconcat(asmbase#" ", asmstr), IIC_VecFP, []>,
168 RegConstraint<"@earlyclobber $AT">;
171 opcode, !or(xo, 0x20), (outs acc:$AT), !con((ins acc:$ATi), IOL),
172 !strconcat(asmbase#"pp ", asmstr), IIC_VecFP, []>,
173 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
175 let Predicates = [MMA, PrefixInstrs, IsNotISAFuture] in {
177 MMIRR_XX3Form_XY4P2_XAB6<
178 opcode, xo, (outs acc:$AT),
179 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK)),
180 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK, $PMSK"),
182 RegConstraint<"@earlyclobber $AT">;
184 MMIRR_XX3Form_XY4P2_XAB6<
185 opcode, !or(xo, 0x20), (outs acc:$AT),
187 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
188 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK, $PMSK"),
190 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
192 let Predicates = [MMA, IsISAFuture], isCodeGenOnly = 1 in {
194 XX3Form_AT3_XAB6<opcode, xo, (outs wacc:$AT), IOL,
195 !strconcat(asmbase#" ", asmstr), IIC_VecFP, []>,
196 RegConstraint<"@earlyclobber $AT">;
199 opcode, !or(xo, 0x20), (outs wacc:$AT), !con((ins wacc:$ATi), IOL),
200 !strconcat(asmbase#"pp ", asmstr), IIC_VecFP, []>,
201 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
203 let Predicates = [MMA, PrefixInstrs, IsISAFuture], isCodeGenOnly = 1 in {
205 MMIRR_XX3Form_XY4P2_XAB6<
206 opcode, xo, (outs wacc:$AT),
207 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK)),
208 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK, $PMSK"),
210 RegConstraint<"@earlyclobber $AT">;
212 MMIRR_XX3Form_XY4P2_XAB6<
213 opcode, !or(xo, 0x20), (outs acc:$AT),
214 !con((ins wacc:$ATi),
215 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
216 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK, $PMSK"),
218 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
222 // Defines 10 instructions, operand negating, unmasked, masked with 2, 4, 4
223 // bits. Upper nibble are masked with 0x8, 0x4, 0xC for negating operands.
224 multiclass ACC_NEG_UM_M244_XOM84C<bits<6> opcode, bits<8> xo, dag IOL,
225 string asmbase, string asmstr> {
226 defm NAME : ACC_UM_M244_XOEO<opcode, xo, IOL, asmbase, asmstr>;
227 let Predicates = [MMA, IsNotISAFuture] in {
228 def PN : XX3Form_AT3_XAB6<
229 opcode, !or(xo, 0x80), (outs acc:$AT), !con((ins acc:$ATi), IOL),
230 !strconcat(asmbase#"pn ", asmstr), IIC_VecFP, []>,
231 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
232 def NP : XX3Form_AT3_XAB6<
233 opcode, !or(xo, 0x40), (outs acc:$AT), !con((ins acc:$ATi), IOL),
234 !strconcat(asmbase#"np ", asmstr), IIC_VecFP, []>,
235 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
236 def NN : XX3Form_AT3_XAB6<
237 opcode, !or(xo, 0xC0), (outs acc:$AT), !con((ins acc:$ATi), IOL),
238 !strconcat(asmbase#"nn ", asmstr), IIC_VecFP, []>,
239 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
241 let Predicates = [MMA, IsISAFuture], isCodeGenOnly = 1 in {
242 def WPN : XX3Form_AT3_XAB6<
243 opcode, !or(xo, 0x80), (outs wacc:$AT), !con((ins wacc:$ATi), IOL),
244 !strconcat(asmbase#"pn ", asmstr), IIC_VecFP, []>,
245 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
246 def WNP : XX3Form_AT3_XAB6<
247 opcode, !or(xo, 0x40), (outs wacc:$AT), !con((ins wacc:$ATi), IOL),
248 !strconcat(asmbase#"np ", asmstr), IIC_VecFP, []>,
249 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
250 def WNN : XX3Form_AT3_XAB6<
251 opcode, !or(xo, 0xC0), (outs wacc:$AT), !con((ins wacc:$ATi), IOL),
252 !strconcat(asmbase#"nn ", asmstr), IIC_VecFP, []>,
253 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
255 let Predicates = [MMA, PrefixInstrs, IsNotISAFuture] in {
257 MMIRR_XX3Form_XY4P2_XAB6<
258 opcode, !or(xo, 0x80), (outs acc:$AT),
259 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
260 !strconcat("pm"#asmbase#"pn ", asmstr#", $XMSK, $YMSK, $PMSK"),
262 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
264 MMIRR_XX3Form_XY4P2_XAB6<
265 opcode, !or(xo, 0x40), (outs acc:$AT),
266 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
267 !strconcat("pm"#asmbase#"np ", asmstr#", $XMSK, $YMSK, $PMSK"),
269 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
271 MMIRR_XX3Form_XY4P2_XAB6<
272 opcode, !or(xo, 0xC0), (outs acc:$AT),
273 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
274 !strconcat("pm"#asmbase#"nn ", asmstr#", $XMSK, $YMSK, $PMSK"),
276 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
278 let Predicates = [MMA, PrefixInstrs, IsISAFuture], isCodeGenOnly = 1 in {
280 MMIRR_XX3Form_XY4P2_XAB6<
281 opcode, !or(xo, 0x80), (outs wacc:$AT),
282 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
283 !strconcat("pm"#asmbase#"pn ", asmstr#", $XMSK, $YMSK, $PMSK"),
285 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
287 MMIRR_XX3Form_XY4P2_XAB6<
288 opcode, !or(xo, 0x40), (outs wacc:$AT),
289 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
290 !strconcat("pm"#asmbase#"np ", asmstr#", $XMSK, $YMSK, $PMSK"),
292 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
294 MMIRR_XX3Form_XY4P2_XAB6<
295 opcode, !or(xo, 0xC0), (outs wacc:$AT),
296 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK, u2imm:$PMSK))),
297 !strconcat("pm"#asmbase#"nn ", asmstr#", $XMSK, $YMSK, $PMSK"),
299 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
303 // Defines 5 instructions, unmasked, operand negating.
304 // Upper nibble are masked with 0x8, 0x4, 0xC for negating operands.
305 multiclass ACC_NEG_UM_XOM84C<bits<6> opcode, bits<8> xo, dag IOL,
306 string asmbase, string asmstr> {
307 defm NAME : ACC_UM_XOEO<opcode, xo, IOL, asmbase, asmstr>;
308 let Predicates = [MMA, IsNotISAFuture] in {
309 def PN : XX3Form_AT3_XAB6<opcode, !or(xo, 0x80), (outs acc:$AT),
310 !con((ins acc:$ATi), IOL),
311 !strconcat(asmbase#"pn ", asmstr), IIC_VecFP, []>,
312 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
313 def NP : XX3Form_AT3_XAB6<opcode, !or(xo, 0x40), (outs acc:$AT),
314 !con((ins acc:$ATi), IOL),
315 !strconcat(asmbase#"np ", asmstr), IIC_VecFP, []>,
316 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
317 def NN : XX3Form_AT3_XAB6<opcode, !or(xo, 0xC0), (outs acc:$AT),
318 !con((ins acc:$ATi), IOL),
319 !strconcat(asmbase#"nn ", asmstr), IIC_VecFP, []>,
320 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
322 let Predicates = [MMA, IsISAFuture], isCodeGenOnly = 1 in {
323 def WPN : XX3Form_AT3_XAB6<opcode, !or(xo, 0x80), (outs wacc:$AT),
324 !con((ins wacc:$ATi), IOL),
325 !strconcat(asmbase#"pn ", asmstr), IIC_VecFP, []>,
326 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
327 def WNP : XX3Form_AT3_XAB6<opcode, !or(xo, 0x40), (outs wacc:$AT),
328 !con((ins wacc:$ATi), IOL),
329 !strconcat(asmbase#"np ", asmstr), IIC_VecFP, []>,
330 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
331 def WNN : XX3Form_AT3_XAB6<opcode, !or(xo, 0xC0), (outs wacc:$AT),
332 !con((ins wacc:$ATi), IOL),
333 !strconcat(asmbase#"nn ", asmstr), IIC_VecFP, []>,
334 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
338 // Defines 10 instructions, operand negating, unmasked, masked with 4, 4 bits.
339 // Upper nibble are masked with 0x8, 0x4, 0xC for negating operands.
340 multiclass ACC_NEG_UM_M44_XOM84C<bits<6> opcode, bits<8> xo, dag IOL,
341 string asmbase, string asmstr> {
342 defm NAME : ACC_NEG_UM_XOM84C<opcode, xo, IOL, asmbase, asmstr>;
343 let Predicates = [MMA, PrefixInstrs, IsNotISAFuture] in {
345 MMIRR_XX3Form_XY4_XAB6<
346 opcode, !or(xo, 0x01), (outs acc:$AT),
347 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK)),
348 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK"),
350 RegConstraint<"@earlyclobber $AT">;
352 MMIRR_XX3Form_XY4_XAB6<
353 opcode, xo, (outs acc:$AT),
354 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK))),
355 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK"),
357 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
359 MMIRR_XX3Form_XY4_XAB6<
360 opcode, !or(xo, 0x80), (outs acc:$AT),
361 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK))),
362 !strconcat("pm"#asmbase#"pn ", asmstr#", $XMSK, $YMSK"),
364 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
366 MMIRR_XX3Form_XY4_XAB6<
367 opcode, !or(xo, 0x40), (outs acc:$AT),
368 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK))),
369 !strconcat("pm"#asmbase#"np ", asmstr#", $XMSK, $YMSK"),
371 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
373 MMIRR_XX3Form_XY4_XAB6<
374 opcode, !or(xo, 0xC0), (outs acc:$AT),
375 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK))),
376 !strconcat("pm"#asmbase#"nn ", asmstr#", $XMSK, $YMSK"),
378 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
380 let Predicates = [MMA, PrefixInstrs, IsISAFuture], isCodeGenOnly = 1 in {
382 MMIRR_XX3Form_XY4_XAB6<
383 opcode, !or(xo, 0x01), (outs wacc:$AT),
384 !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK)),
385 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK"),
387 RegConstraint<"@earlyclobber $AT">;
389 MMIRR_XX3Form_XY4_XAB6<
390 opcode, xo, (outs wacc:$AT),
391 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK))),
392 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK"),
394 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
396 MMIRR_XX3Form_XY4_XAB6<
397 opcode, !or(xo, 0x80), (outs wacc:$AT),
398 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK))),
399 !strconcat("pm"#asmbase#"pn ", asmstr#", $XMSK, $YMSK"),
401 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
403 MMIRR_XX3Form_XY4_XAB6<
404 opcode, !or(xo, 0x40), (outs wacc:$AT),
405 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK))),
406 !strconcat("pm"#asmbase#"np ", asmstr#", $XMSK, $YMSK"),
408 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
410 MMIRR_XX3Form_XY4_XAB6<
411 opcode, !or(xo, 0xC0), (outs wacc:$AT),
412 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u4imm:$YMSK))),
413 !strconcat("pm"#asmbase#"nn ", asmstr#", $XMSK, $YMSK"),
415 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
419 // Defines 10 instructions, operand negating, unmasked, masked with 4, 2 bits.
420 // Upper nibble are masked with 0x8, 0x4, 0xC for negating operands.
421 multiclass ACC_NEG_UM_M42_XOM84C<bits<6> opcode, bits<8> xo, dag IOL,
422 string asmbase, string asmstr> {
423 defm NAME : ACC_NEG_UM_XOM84C<opcode, xo, IOL, asmbase, asmstr>;
424 let Predicates = [MMA, PrefixInstrs, IsNotISAFuture] in {
426 MMIRR_XX3Form_X4Y2_XAB6<
427 opcode, !or(xo, 0x01), (outs acc:$AT),
428 !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK)),
429 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK"),
431 RegConstraint<"@earlyclobber $AT">;
433 MMIRR_XX3Form_X4Y2_XAB6<
434 opcode, xo, (outs acc:$AT),
435 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK))),
436 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK"),
438 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
440 MMIRR_XX3Form_X4Y2_XAB6<
441 opcode, !or(xo, 0x80), (outs acc:$AT),
442 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK))),
443 !strconcat("pm"#asmbase#"pn ", asmstr#", $XMSK, $YMSK"),
445 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
447 MMIRR_XX3Form_X4Y2_XAB6<
448 opcode, !or(xo, 0x40), (outs acc:$AT),
449 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK))),
450 !strconcat("pm"#asmbase#"np ", asmstr#", $XMSK, $YMSK"),
452 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
454 MMIRR_XX3Form_X4Y2_XAB6<
455 opcode, !or(xo, 0xC0), (outs acc:$AT),
456 !con((ins acc:$ATi), !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK))),
457 !strconcat("pm"#asmbase#"nn ", asmstr#", $XMSK, $YMSK"),
459 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
461 let Predicates = [MMA, PrefixInstrs, IsISAFuture], isCodeGenOnly = 1 in {
463 MMIRR_XX3Form_X4Y2_XAB6<
464 opcode, !or(xo, 0x01), (outs wacc:$AT),
465 !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK)),
466 !strconcat("pm"#asmbase#" ", asmstr#", $XMSK, $YMSK"),
468 RegConstraint<"@earlyclobber $AT">;
470 MMIRR_XX3Form_X4Y2_XAB6<
471 opcode, xo, (outs wacc:$AT),
472 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK))),
473 !strconcat("pm"#asmbase#"pp ", asmstr#", $XMSK, $YMSK"),
475 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
477 MMIRR_XX3Form_X4Y2_XAB6<
478 opcode, !or(xo, 0x80), (outs wacc:$AT),
479 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK))),
480 !strconcat("pm"#asmbase#"pn ", asmstr#", $XMSK, $YMSK"),
482 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
484 MMIRR_XX3Form_X4Y2_XAB6<
485 opcode, !or(xo, 0x40), (outs wacc:$AT),
486 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK))),
487 !strconcat("pm"#asmbase#"np ", asmstr#", $XMSK, $YMSK"),
489 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
491 MMIRR_XX3Form_X4Y2_XAB6<
492 opcode, !or(xo, 0xC0), (outs wacc:$AT),
493 !con((ins wacc:$ATi), !con(IOL, (ins u4imm:$XMSK, u2imm:$YMSK))),
494 !strconcat("pm"#asmbase#"nn ", asmstr#", $XMSK, $YMSK"),
496 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
500 // End of class definitions.
501 //-----------------------------------------------------------------------------
503 let Predicates = [MMA, IsNotISAFuture] in {
505 XForm_AT3<31, 0, 177, (outs acc:$ATo), (ins acc:$AT), "xxmfacc $AT",
507 [(set v512i1:$ATo, (int_ppc_mma_xxmfacc v512i1:$AT))]>,
508 RegConstraint<"$ATo = $AT">, NoEncode<"$ATo">;
510 XForm_AT3<31, 1, 177, (outs acc:$AT), (ins acc:$ATi), "xxmtacc $AT",
512 [(set v512i1:$AT, (int_ppc_mma_xxmtacc v512i1:$ATi))]>,
513 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
514 def KILL_PAIR : PPCPostRAExpPseudo<(outs vsrprc:$XTp), (ins vsrprc:$XSp),
516 RegConstraint<"$XTp = $XSp">;
517 def BUILD_UACC : PPCPostRAExpPseudo<(outs acc:$AT), (ins uacc:$AS),
518 "#BUILD_UACC $AT, $AS", []>;
519 // We define XXSETACCZ as rematerializable to undo CSE of that intrinsic in
520 // the backend. We avoid CSE here because it generates a copy of the acc
521 // register and this copy is more expensive than calling the intrinsic again.
522 let isAsCheapAsAMove = 1, isReMaterializable = 1 in {
524 XForm_AT3<31, 3, 177, (outs acc:$AT), (ins), "xxsetaccz $AT", IIC_VecGeneral,
525 [(set v512i1:$AT, (int_ppc_mma_xxsetaccz))]>;
528 XX3Form_AT3_XAB6<59, 99, (outs acc:$AT), (ins acc:$ATi, vsrc:$XA, vsrc:$XB),
529 "xvi8ger4spp $AT, $XA, $XB", IIC_VecGeneral, []>,
530 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
531 let mayStore = 1 in {
532 def SPILL_ACC: PPCEmitTimePseudo<(outs), (ins acc:$AT, memrix16:$dst),
534 def SPILL_UACC: PPCEmitTimePseudo<(outs), (ins uacc:$AT, memrix16:$dst),
537 let mayLoad = 1, hasSideEffects = 0 in {
538 def RESTORE_ACC: PPCEmitTimePseudo<(outs acc:$AT), (ins memrix16:$src),
540 def RESTORE_UACC: PPCEmitTimePseudo<(outs uacc:$AT), (ins memrix16:$src),
541 "#RESTORE_UACC", []>;
545 let Predicates = [MMA, IsISAFuture], isCodeGenOnly = 1 in {
546 // For Future and up XXMFACCW and XXMTACCW will not have patterns.
547 // On Future CPU the wacc registers no longer overlap with the vsr registers
548 // and so register allocation would have to know to match 4 vsr registers
549 // with one wacc register.
550 // On top of that Future CPU has a more convenient way to move between vsrs
551 // and wacc registers using xxextfdmr512 and xxinstdmr512.
553 XForm_AT3<31, 0, 177, (outs wacc:$ATo), (ins wacc:$AT), "xxmfacc $AT",
555 RegConstraint<"$ATo = $AT">, NoEncode<"$ATo">;
557 XForm_AT3<31, 1, 177, (outs wacc:$AT), (ins wacc:$ATi), "xxmtacc $AT",
559 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
561 let isAsCheapAsAMove = 1, isReMaterializable = 1 in {
563 XForm_AT3<31, 3, 177, (outs wacc:$AT), (ins), "xxsetaccz $AT",
564 IIC_VecGeneral, [(set v512i1:$AT, (int_ppc_mma_xxsetaccz))]>;
568 XX3Form_AT3_XAB6<59, 99, (outs wacc:$AT),
569 (ins wacc:$ATi, vsrc:$XA, vsrc:$XB),
570 "xvi8ger4spp $AT, $XA, $XB", IIC_VecGeneral, []>,
571 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
573 let mayStore = 1 in {
574 def SPILL_WACC: PPCEmitTimePseudo<(outs), (ins wacc:$AT, memrix16:$dst),
577 let mayLoad = 1, hasSideEffects = 0 in {
578 def RESTORE_WACC: PPCEmitTimePseudo<(outs wacc:$AT), (ins memrix16:$src),
579 "#RESTORE_WACC", []>;
583 let Predicates = [MMA, PrefixInstrs, IsNotISAFuture] in {
585 MMIRR_XX3Form_XYP4_XAB6<59, 99, (outs acc:$AT),
586 (ins acc:$ATi, vsrc:$XA,vsrc:$XB, u4imm:$XMSK,
587 u4imm:$YMSK, u4imm:$PMSK),
588 "pmxvi8ger4spp $AT, $XA, $XB, $XMSK, $YMSK, $PMSK",
590 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
593 let Predicates = [MMA, PrefixInstrs, IsISAFuture], isCodeGenOnly = 1 in {
595 MMIRR_XX3Form_XYP4_XAB6<59, 99, (outs wacc:$AT),
596 (ins wacc:$ATi, vsrc:$XA,vsrc:$XB, u4imm:$XMSK,
597 u4imm:$YMSK, u4imm:$PMSK),
598 "pmxvi8ger4spp $AT, $XA, $XB, $XMSK, $YMSK, $PMSK",
600 RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
603 // MMA accumulating/non-accumulating instructions.
604 //------------------------------------------------------------------------------
606 // XVBF16GER2, XVBF16GER2PP, XVBF16GER2PN, XVBF16GER2NP, XVBF16GER2NN
607 // PMXVBF16GER2, PMXVBF16GER2PP, PMXVBF16GER2PN, PMXVBF16GER2NP, PMXVBF16GER2NN
608 defm XVBF16GER2 : ACC_NEG_UM_M244_XOM84C<59, 50, (ins vsrc:$XA, vsrc:$XB),
609 "xvbf16ger2", "$AT, $XA, $XB">;
611 // XVI4GER8, XVI4GER8PP, PMXVI4GER8, PMXVI4GER8PP
612 defm XVI4GER8 : ACC_UM_M844_XOEO<59, 34, (ins vsrc:$XA, vsrc:$XB),
613 "xvi4ger8", "$AT, $XA, $XB">;
615 // XVI8GER4, XVI8GER4PP, PMXVI8GER4, PMXVI8GER4PP
616 defm XVI8GER4 : ACC_UM_M444_XOEO<59, 2, (ins vsrc:$XA, vsrc:$XB),
617 "xvi8ger4", "$AT, $XA, $XB">;
619 // XVI16GER2, XVI16GER2PP, PMXVI16GER2, PMXVI16GER2PP
620 defm XVI16GER2 : ACC_UM_M244_XO46<59, 75, (ins vsrc:$XA, vsrc:$XB),
621 "xvi16ger2", "$AT, $XA, $XB">;
623 // XVI16GER2S, XVI16GER2SPP, PMXVI16GER2S, PMXVI16GER2SPP
624 defm XVI16GER2S : ACC_UM_M244_XOEO<59, 42, (ins vsrc:$XA, vsrc:$XB),
625 "xvi16ger2s", "$AT, $XA, $XB">;
627 // XVF16GER2, XVF16GER2PP, XVF16GER2PN, XVF16GER2NP, XVF16GER2NN
628 // PMXVF16GER2, PMXVF16GER2PP, PMXVF16GER2PN, PMXVF16GER2NP, PMXVF16GER2NN
629 defm XVF16GER2 : ACC_NEG_UM_M244_XOM84C<59, 18, (ins vsrc:$XA, vsrc:$XB),
630 "xvf16ger2", "$AT, $XA, $XB">;
632 // XVF32GER, XVF32GERPP, XVF32GERPN, XVF32GERNP, XVF32GERPP
633 // PMXVF32GER, PMXVF32GERPP, PMXVF32GERPN, PMXVF32GERNP, PMXVF32GERPP
634 defm XVF32GER : ACC_NEG_UM_M44_XOM84C<59, 26, (ins vsrc:$XA, vsrc:$XB),
635 "xvf32ger", "$AT, $XA, $XB">;
637 // XVF64GER, XVF64GERPP, XVF64GERPN, XVF64GERNP, XVF64GERNN
638 // PMXVF64GER, PMXVF64GERPP, PMXVF64GERPN, PMXVF64GERNP, PMXVF64GERNN
639 defm XVF64GER : ACC_NEG_UM_M42_XOM84C<59, 58, (ins vsrpevenrc:$XA, vsrc:$XB),
640 "xvf64ger", "$AT, $XA, $XB">;
641 //------------------------------------------------------------------------------
644 let Predicates = [MMA, IsNotISAFuture] in {
645 def : Pat<(v512i1 (int_ppc_mma_xvi4ger8 v16i8:$XA, v16i8:$XB)),
646 (XVI4GER8 RCCp.AToVSRC, RCCp.BToVSRC)>;
647 def : Pat<(v512i1 (int_ppc_mma_xvi4ger8pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
648 (XVI4GER8PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
650 def : Pat<(v512i1 (int_ppc_mma_xvi8ger4 v16i8:$XA, v16i8:$XB)),
651 (XVI8GER4 RCCp.AToVSRC, RCCp.BToVSRC)>;
652 def : Pat<(v512i1 (int_ppc_mma_xvi8ger4pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
653 (XVI8GER4PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
655 def : Pat<(v512i1 (int_ppc_mma_xvi16ger2s v16i8:$XA, v16i8:$XB)),
656 (XVI16GER2S RCCp.AToVSRC, RCCp.BToVSRC)>;
657 def : Pat<(v512i1 (int_ppc_mma_xvi16ger2spp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
658 (XVI16GER2SPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
661 let Predicates = [MMA, IsISAFuture] in {
662 def : Pat<(v512i1 (int_ppc_mma_xvi4ger8 v16i8:$XA, v16i8:$XB)),
663 (XVI4GER8W RCCp.AToVSRC, RCCp.BToVSRC)>;
664 def : Pat<(v512i1 (int_ppc_mma_xvi4ger8pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
665 (XVI4GER8WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
667 def : Pat<(v512i1 (int_ppc_mma_xvi8ger4 v16i8:$XA, v16i8:$XB)),
668 (XVI8GER4W RCCp.AToVSRC, RCCp.BToVSRC)>;
669 def : Pat<(v512i1 (int_ppc_mma_xvi8ger4pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
670 (XVI8GER4WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
672 def : Pat<(v512i1 (int_ppc_mma_xvi16ger2s v16i8:$XA, v16i8:$XB)),
673 (XVI16GER2SW RCCp.AToVSRC, RCCp.BToVSRC)>;
674 def : Pat<(v512i1 (int_ppc_mma_xvi16ger2spp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
675 (XVI16GER2SWPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
678 let Predicates = [MMA, IsNotISAFuture] in {
679 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2 v16i8:$XA, v16i8:$XB)),
680 (XVF16GER2 RCCp.AToVSRC, RCCp.BToVSRC)>;
681 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
682 (XVF16GER2PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
683 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2pn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
684 (XVF16GER2PN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
685 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2np v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
686 (XVF16GER2NP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
687 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2nn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
688 (XVF16GER2NN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
691 let Predicates = [MMA, IsISAFuture] in {
692 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2 v16i8:$XA, v16i8:$XB)),
693 (XVF16GER2W RCCp.AToVSRC, RCCp.BToVSRC)>;
694 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
695 (XVF16GER2WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
696 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2pn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
697 (XVF16GER2WPN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
698 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2np v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
699 (XVF16GER2WNP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
700 def : Pat<(v512i1 (int_ppc_mma_xvf16ger2nn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
701 (XVF16GER2WNN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
704 let Predicates = [MMA, IsNotISAFuture] in {
705 def : Pat<(v512i1 (int_ppc_mma_xvf32ger v16i8:$XA, v16i8:$XB)),
706 (XVF32GER RCCp.AToVSRC, RCCp.BToVSRC)>;
707 def : Pat<(v512i1 (int_ppc_mma_xvf32gerpp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
708 (XVF32GERPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
709 def : Pat<(v512i1 (int_ppc_mma_xvf32gerpn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
710 (XVF32GERPN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
711 def : Pat<(v512i1 (int_ppc_mma_xvf32gernp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
712 (XVF32GERNP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
713 def : Pat<(v512i1 (int_ppc_mma_xvf32gernn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
714 (XVF32GERNN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
715 def : Pat<(v512i1 (int_ppc_mma_xvf64ger v256i1:$XA, v16i8:$XB)),
716 (XVF64GER $XA, RCCp.BToVSRC)>;
717 def : Pat<(v512i1 (int_ppc_mma_xvf64gerpp v512i1:$ATi, v256i1:$XA, v16i8:$XB)),
718 (XVF64GERPP $ATi, $XA, RCCp.BToVSRC)>;
719 def : Pat<(v512i1 (int_ppc_mma_xvf64gerpn v512i1:$ATi, v256i1:$XA, v16i8:$XB)),
720 (XVF64GERPN $ATi, $XA, RCCp.BToVSRC)>;
721 def : Pat<(v512i1 (int_ppc_mma_xvf64gernp v512i1:$ATi, v256i1:$XA, v16i8:$XB)),
722 (XVF64GERNP $ATi, $XA, RCCp.BToVSRC)>;
723 def : Pat<(v512i1 (int_ppc_mma_xvf64gernn v512i1:$ATi, v256i1:$XA, v16i8:$XB)),
724 (XVF64GERNN $ATi, $XA, RCCp.BToVSRC)>;
726 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2 v16i8:$XA, v16i8:$XB)),
727 (XVBF16GER2 RCCp.AToVSRC, RCCp.BToVSRC)>;
728 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
729 (XVBF16GER2PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
730 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2pn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
731 (XVBF16GER2PN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
732 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2np v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
733 (XVBF16GER2NP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
734 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2nn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
735 (XVBF16GER2NN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
736 def : Pat<(v512i1 (int_ppc_mma_xvi16ger2 v16i8:$XA, v16i8:$XB)),
737 (XVI16GER2 RCCp.AToVSRC, RCCp.BToVSRC)>;
738 def : Pat<(v512i1 (int_ppc_mma_xvi16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
739 (XVI16GER2PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
740 def : Pat<(v512i1 (int_ppc_mma_xvi8ger4spp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
741 (XVI8GER4SPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
744 let Predicates = [MMA, IsISAFuture] in {
745 def : Pat<(v512i1 (int_ppc_mma_xvf32ger v16i8:$XA, v16i8:$XB)),
746 (XVF32GERW RCCp.AToVSRC, RCCp.BToVSRC)>;
747 def : Pat<(v512i1 (int_ppc_mma_xvf32gerpp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
748 (XVF32GERWPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
749 def : Pat<(v512i1 (int_ppc_mma_xvf32gerpn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
750 (XVF32GERWPN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
751 def : Pat<(v512i1 (int_ppc_mma_xvf32gernp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
752 (XVF32GERWNP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
753 def : Pat<(v512i1 (int_ppc_mma_xvf32gernn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
754 (XVF32GERWNN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
755 def : Pat<(v512i1 (int_ppc_mma_xvf64ger v256i1:$XA, v16i8:$XB)),
756 (XVF64GERW $XA, RCCp.BToVSRC)>;
757 def : Pat<(v512i1 (int_ppc_mma_xvf64gerpp v512i1:$ATi, v256i1:$XA, v16i8:$XB)),
758 (XVF64GERWPP $ATi, $XA, RCCp.BToVSRC)>;
759 def : Pat<(v512i1 (int_ppc_mma_xvf64gerpn v512i1:$ATi, v256i1:$XA, v16i8:$XB)),
760 (XVF64GERWPN $ATi, $XA, RCCp.BToVSRC)>;
761 def : Pat<(v512i1 (int_ppc_mma_xvf64gernp v512i1:$ATi, v256i1:$XA, v16i8:$XB)),
762 (XVF64GERNP $ATi, $XA, RCCp.BToVSRC)>;
763 def : Pat<(v512i1 (int_ppc_mma_xvf64gernn v512i1:$ATi, v256i1:$XA, v16i8:$XB)),
764 (XVF64GERWNN $ATi, $XA, RCCp.BToVSRC)>;
766 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2 v16i8:$XA, v16i8:$XB)),
767 (XVBF16GER2W RCCp.AToVSRC, RCCp.BToVSRC)>;
768 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
769 (XVBF16GER2WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
770 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2pn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
771 (XVBF16GER2WPN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
772 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2np v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
773 (XVBF16GER2WNP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
774 def : Pat<(v512i1 (int_ppc_mma_xvbf16ger2nn v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
775 (XVBF16GER2WNN $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
776 def : Pat<(v512i1 (int_ppc_mma_xvi16ger2 v16i8:$XA, v16i8:$XB)),
777 (XVI16GER2W RCCp.AToVSRC, RCCp.BToVSRC)>;
778 def : Pat<(v512i1 (int_ppc_mma_xvi16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
779 (XVI16GER2WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
780 def : Pat<(v512i1 (int_ppc_mma_xvi8ger4spp v512i1:$ATi, v16i8:$XA, v16i8:$XB)),
781 (XVI8GER4WSPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC)>;
785 let Predicates = [MMA, PrefixInstrs, IsNotISAFuture] in {
786 def : Pat<(v512i1 (int_ppc_mma_pmxvi4ger8 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
787 Msk4Imm:$YMSK, Msk8Imm:$PMSK)),
788 (PMXVI4GER8 RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
789 Msk4Imm:$YMSK, Msk8Imm:$PMSK)>;
790 def : Pat<(v512i1 (int_ppc_mma_pmxvi4ger8pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
791 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
793 (PMXVI4GER8PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
794 Msk4Imm:$YMSK, Msk8Imm:$PMSK)>;
796 def : Pat<(v512i1 (int_ppc_mma_pmxvi8ger4 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
797 Msk4Imm:$YMSK, Msk4Imm:$PMSK)),
798 (PMXVI8GER4 RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
799 Msk4Imm:$YMSK, Msk4Imm:$PMSK)>;
800 def : Pat<(v512i1 (int_ppc_mma_pmxvi8ger4pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
801 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
803 (PMXVI8GER4PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
804 Msk4Imm:$YMSK, Msk4Imm:$PMSK)>;
806 def : Pat<(v512i1 (int_ppc_mma_pmxvi16ger2s v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
807 Msk4Imm:$YMSK, Msk2Imm:$PMSK)),
808 (PMXVI16GER2S RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
809 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
810 def : Pat<(v512i1 (int_ppc_mma_pmxvi16ger2spp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
811 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
813 (PMXVI16GER2SPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
814 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
815 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
816 Msk4Imm:$YMSK, Msk2Imm:$PMSK)),
817 (PMXVF16GER2 RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
818 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
819 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
820 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
822 (PMXVF16GER2PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
823 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
824 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2pn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
825 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
827 (PMXVF16GER2PN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
828 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
829 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2np v512i1:$ATi, v16i8:$XA, v16i8:$XB,
830 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
832 (PMXVF16GER2NP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
833 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
834 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2nn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
835 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
837 (PMXVF16GER2NN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
838 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
840 def : Pat<(v512i1 (int_ppc_mma_pmxvf32ger v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
842 (PMXVF32GER RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
844 def : Pat<(v512i1 (int_ppc_mma_pmxvf32gerpp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
845 Msk4Imm:$XMSK, Msk4Imm:$YMSK)),
846 (PMXVF32GERPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
848 def : Pat<(v512i1 (int_ppc_mma_pmxvf32gerpn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
849 Msk4Imm:$XMSK, Msk4Imm:$YMSK)),
850 (PMXVF32GERPN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
852 def : Pat<(v512i1 (int_ppc_mma_pmxvf32gernp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
853 Msk4Imm:$XMSK, Msk4Imm:$YMSK)),
854 (PMXVF32GERNP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
856 def : Pat<(v512i1 (int_ppc_mma_pmxvf32gernn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
857 Msk4Imm:$XMSK, Msk4Imm:$YMSK)),
858 (PMXVF32GERNN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
861 def : Pat<(v512i1 (int_ppc_mma_pmxvf64ger v256i1:$XA, v16i8:$XB, Msk4Imm:$XMSK,
863 (PMXVF64GER $XA, RCCp.BToVSRC, Msk4Imm:$XMSK, Msk2Imm:$YMSK)>;
864 def : Pat<(v512i1 (int_ppc_mma_pmxvf64gerpp v512i1:$ATi, v256i1:$XA, v16i8:$XB,
865 Msk4Imm:$XMSK, Msk2Imm:$YMSK)),
866 (PMXVF64GERPP $ATi, $XA, RCCp.BToVSRC, Msk4Imm:$XMSK,
868 def : Pat<(v512i1 (int_ppc_mma_pmxvf64gerpn v512i1:$ATi, v256i1:$XA, v16i8:$XB,
869 Msk4Imm:$XMSK, Msk2Imm:$YMSK)),
870 (PMXVF64GERPN $ATi, $XA, RCCp.BToVSRC, Msk4Imm:$XMSK,
872 def : Pat<(v512i1 (int_ppc_mma_pmxvf64gernp v512i1:$ATi, v256i1:$XA, v16i8:$XB,
873 Msk4Imm:$XMSK, Msk2Imm:$YMSK)),
874 (PMXVF64GERNP $ATi, $XA, RCCp.BToVSRC, Msk4Imm:$XMSK,
876 def : Pat<(v512i1 (int_ppc_mma_pmxvf64gernn v512i1:$ATi, v256i1:$XA, v16i8:$XB,
877 Msk4Imm:$XMSK, Msk2Imm:$YMSK)),
878 (PMXVF64GERNN $ATi, $XA, RCCp.BToVSRC, Msk4Imm:$XMSK,
881 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
882 Msk4Imm:$YMSK, Msk2Imm:$PMSK)),
883 (PMXVBF16GER2 RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
884 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
885 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
886 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
888 (PMXVBF16GER2PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
889 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
890 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2pn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
891 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
893 (PMXVBF16GER2PN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
894 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
895 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2np v512i1:$ATi, v16i8:$XA, v16i8:$XB,
896 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
898 (PMXVBF16GER2NP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
899 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
900 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2nn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
901 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
903 (PMXVBF16GER2NN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
904 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
905 def : Pat<(v512i1 (int_ppc_mma_pmxvi16ger2 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
906 Msk4Imm:$YMSK, Msk2Imm:$PMSK)),
907 (PMXVI16GER2 RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
908 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
909 def : Pat<(v512i1 (int_ppc_mma_pmxvi8ger4spp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
910 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
912 (PMXVI8GER4SPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
913 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
914 def : Pat<(v512i1 (int_ppc_mma_pmxvi16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
915 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
917 (PMXVI16GER2PP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
918 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
921 let Predicates = [MMA, PrefixInstrs, IsISAFuture] in {
922 def : Pat<(v512i1 (int_ppc_mma_pmxvi4ger8 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
923 Msk4Imm:$YMSK, Msk8Imm:$PMSK)),
924 (PMXVI4GER8W RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
925 Msk4Imm:$YMSK, Msk8Imm:$PMSK)>;
926 def : Pat<(v512i1 (int_ppc_mma_pmxvi4ger8pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
927 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
929 (PMXVI4GER8WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
930 Msk4Imm:$YMSK, Msk8Imm:$PMSK)>;
932 def : Pat<(v512i1 (int_ppc_mma_pmxvi8ger4 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
933 Msk4Imm:$YMSK, Msk4Imm:$PMSK)),
934 (PMXVI8GER4W RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
935 Msk4Imm:$YMSK, Msk4Imm:$PMSK)>;
936 def : Pat<(v512i1 (int_ppc_mma_pmxvi8ger4pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
937 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
939 (PMXVI8GER4WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
940 Msk4Imm:$YMSK, Msk4Imm:$PMSK)>;
942 def : Pat<(v512i1 (int_ppc_mma_pmxvi16ger2s v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
943 Msk4Imm:$YMSK, Msk2Imm:$PMSK)),
944 (PMXVI16GER2SW RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
945 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
946 def : Pat<(v512i1 (int_ppc_mma_pmxvi16ger2spp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
947 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
949 (PMXVI16GER2SWPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
950 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
951 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
952 Msk4Imm:$YMSK, Msk2Imm:$PMSK)),
953 (PMXVF16GER2W RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
954 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
955 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
956 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
958 (PMXVF16GER2WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
959 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
960 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2pn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
961 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
963 (PMXVF16GER2WPN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
964 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
965 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2np v512i1:$ATi, v16i8:$XA, v16i8:$XB,
966 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
968 (PMXVF16GER2WNP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
969 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
970 def : Pat<(v512i1 (int_ppc_mma_pmxvf16ger2nn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
971 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
973 (PMXVF16GER2WNN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
974 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
976 def : Pat<(v512i1 (int_ppc_mma_pmxvf32ger v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
978 (PMXVF32GERW RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
980 def : Pat<(v512i1 (int_ppc_mma_pmxvf32gerpp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
981 Msk4Imm:$XMSK, Msk4Imm:$YMSK)),
982 (PMXVF32GERWPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
984 def : Pat<(v512i1 (int_ppc_mma_pmxvf32gerpn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
985 Msk4Imm:$XMSK, Msk4Imm:$YMSK)),
986 (PMXVF32GERWPN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
988 def : Pat<(v512i1 (int_ppc_mma_pmxvf32gernp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
989 Msk4Imm:$XMSK, Msk4Imm:$YMSK)),
990 (PMXVF32GERWNP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
992 def : Pat<(v512i1 (int_ppc_mma_pmxvf32gernn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
993 Msk4Imm:$XMSK, Msk4Imm:$YMSK)),
994 (PMXVF32GERWNN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
997 def : Pat<(v512i1 (int_ppc_mma_pmxvf64ger v256i1:$XA, v16i8:$XB, Msk4Imm:$XMSK,
999 (PMXVF64GERW $XA, RCCp.BToVSRC, Msk4Imm:$XMSK, Msk2Imm:$YMSK)>;
1000 def : Pat<(v512i1 (int_ppc_mma_pmxvf64gerpp v512i1:$ATi, v256i1:$XA, v16i8:$XB,
1001 Msk4Imm:$XMSK, Msk2Imm:$YMSK)),
1002 (PMXVF64GERWPP $ATi, $XA, RCCp.BToVSRC, Msk4Imm:$XMSK,
1004 def : Pat<(v512i1 (int_ppc_mma_pmxvf64gerpn v512i1:$ATi, v256i1:$XA, v16i8:$XB,
1005 Msk4Imm:$XMSK, Msk2Imm:$YMSK)),
1006 (PMXVF64GERWPN $ATi, $XA, RCCp.BToVSRC, Msk4Imm:$XMSK,
1008 def : Pat<(v512i1 (int_ppc_mma_pmxvf64gernp v512i1:$ATi, v256i1:$XA, v16i8:$XB,
1009 Msk4Imm:$XMSK, Msk2Imm:$YMSK)),
1010 (PMXVF64GERWNP $ATi, $XA, RCCp.BToVSRC, Msk4Imm:$XMSK,
1012 def : Pat<(v512i1 (int_ppc_mma_pmxvf64gernn v512i1:$ATi, v256i1:$XA, v16i8:$XB,
1013 Msk4Imm:$XMSK, Msk2Imm:$YMSK)),
1014 (PMXVF64GERWNN $ATi, $XA, RCCp.BToVSRC, Msk4Imm:$XMSK,
1017 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
1018 Msk4Imm:$YMSK, Msk2Imm:$PMSK)),
1019 (PMXVBF16GER2W RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
1020 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
1021 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
1022 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
1024 (PMXVBF16GER2WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
1025 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
1026 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2pn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
1027 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
1029 (PMXVBF16GER2WPN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
1030 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
1031 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2np v512i1:$ATi, v16i8:$XA, v16i8:$XB,
1032 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
1034 (PMXVBF16GER2WNP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
1035 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
1036 def : Pat<(v512i1 (int_ppc_mma_pmxvbf16ger2nn v512i1:$ATi, v16i8:$XA, v16i8:$XB,
1037 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
1039 (PMXVBF16GER2WNN $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
1040 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
1041 def : Pat<(v512i1 (int_ppc_mma_pmxvi16ger2 v16i8:$XA, v16i8:$XB, Msk4Imm:$XMSK,
1042 Msk4Imm:$YMSK, Msk2Imm:$PMSK)),
1043 (PMXVI16GER2W RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
1044 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
1045 def : Pat<(v512i1 (int_ppc_mma_pmxvi8ger4spp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
1046 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
1048 (PMXVI8GER4WSPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
1049 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
1050 def : Pat<(v512i1 (int_ppc_mma_pmxvi16ger2pp v512i1:$ATi, v16i8:$XA, v16i8:$XB,
1051 Msk4Imm:$XMSK, Msk4Imm:$YMSK,
1053 (PMXVI16GER2WPP $ATi, RCCp.AToVSRC, RCCp.BToVSRC, Msk4Imm:$XMSK,
1054 Msk4Imm:$YMSK, Msk2Imm:$PMSK)>;
1058 dag VecsToVecPair0 =
1059 (v256i1 (INSERT_SUBREG
1060 (INSERT_SUBREG (IMPLICIT_DEF), $vs0, sub_vsx1),
1062 dag VecsToVecPair1 =
1063 (v256i1 (INSERT_SUBREG
1064 (INSERT_SUBREG (IMPLICIT_DEF), $vs2, sub_vsx1),
1067 (BUILD_UACC (INSERT_SUBREG
1068 (INSERT_SUBREG (v512i1 (IMPLICIT_DEF)),
1069 (KILL_PAIR VecsToVecPair0), sub_pair0),
1070 (KILL_PAIR VecsToVecPair1), sub_pair1));
1074 dag Pair0 = (v256i1 (EXTRACT_SUBREG $v, sub_pair0));
1075 dag Pair1 = (v256i1 (EXTRACT_SUBREG $v, sub_pair1));
1076 dag Vec0 = (v4i32 (EXTRACT_SUBREG Pair0, sub_vsx0));
1077 dag Vec1 = (v4i32 (EXTRACT_SUBREG Pair0, sub_vsx1));
1078 dag Vec2 = (v4i32 (EXTRACT_SUBREG Pair1, sub_vsx0));
1079 dag Vec3 = (v4i32 (EXTRACT_SUBREG Pair1, sub_vsx1));
1082 let Predicates = [MMA, IsNotISAFuture] in {
1083 def : Pat<(v512i1 (PPCAccBuild v4i32:$vs1, v4i32:$vs0, v4i32:$vs3, v4i32:$vs2)),
1084 (XXMTACC ConcatsMMA.VecsToVecQuad)>;
1085 def : Pat<(v512i1 (int_ppc_mma_assemble_acc v16i8:$vs1, v16i8:$vs0,
1086 v16i8:$vs3, v16i8:$vs2)),
1087 (XXMTACC ConcatsMMA.VecsToVecQuad)>;
1088 def : Pat<(v512i1 (PPCxxmfacc v512i1:$AS)), (XXMFACC acc:$AS)>;
1089 def : Pat<(v4i32 (PPCAccExtractVsx acc:$v, 0)),
1091 def : Pat<(v4i32 (PPCAccExtractVsx acc:$v, 1)),
1093 def : Pat<(v4i32 (PPCAccExtractVsx acc:$v, 2)),
1095 def : Pat<(v4i32 (PPCAccExtractVsx acc:$v, 3)),
1099 let Predicates = [MMA, IsISAFuture] in {
1100 def : Pat<(v512i1 (PPCAccBuild v4i32:$vs1, v4i32:$vs0, v4i32:$vs3, v4i32:$vs2)),
1101 (DMXXINSTFDMR512 ConcatsMMA.VecsToVecPair0, ConcatsMMA.VecsToVecPair1)>;
1102 def : Pat<(v512i1 (int_ppc_mma_assemble_acc v16i8:$vs1, v16i8:$vs0,
1103 v16i8:$vs3, v16i8:$vs2)),
1104 (DMXXINSTFDMR512 ConcatsMMA.VecsToVecPair0, ConcatsMMA.VecsToVecPair1)>;
1105 def : Pat<(v512i1 immAllZerosV), (XXSETACCZW)>;