@@ -147,11 +147,9 @@ class ScalableMaskedIOp<string mnemonic, string op_description,
147
147
"$mask `,` $src1 `,` $src2 attr-dict `:` type($mask) `,` type($res)";
148
148
}
149
149
150
- def SdotOp : ArmSVE_Op<"sdot",
151
- [Pure,
152
- AllTypesMatch<["src1", "src2"]>,
153
- AllTypesMatch<["acc", "dst"]>,
154
- ]> {
150
+ def SdotOp : ArmSVE_Op<"sdot", [Pure,
151
+ AllTypesMatch<["src1", "src2"]>,
152
+ AllTypesMatch<["acc", "dst"]>]> {
155
153
let summary = "Vector-vector dot product and accumulate op";
156
154
let description = [{
157
155
SDOT: Signed integer addition of dot product.
@@ -178,11 +176,9 @@ def SdotOp : ArmSVE_Op<"sdot",
178
176
"$acc `,` $src1 `,` $src2 attr-dict `:` type($src1) `to` type($dst)";
179
177
}
180
178
181
- def SmmlaOp : ArmSVE_Op<"smmla",
182
- [Pure,
183
- AllTypesMatch<["src1", "src2"]>,
184
- AllTypesMatch<["acc", "dst"]>,
185
- ]> {
179
+ def SmmlaOp : ArmSVE_Op<"smmla", [Pure,
180
+ AllTypesMatch<["src1", "src2"]>,
181
+ AllTypesMatch<["acc", "dst"]>]> {
186
182
let summary = "Matrix-matrix multiply and accumulate op";
187
183
let description = [{
188
184
SMMLA: Signed integer matrix multiply-accumulate.
@@ -210,11 +206,9 @@ def SmmlaOp : ArmSVE_Op<"smmla",
210
206
"$acc `,` $src1 `,` $src2 attr-dict `:` type($src1) `to` type($dst)";
211
207
}
212
208
213
- def UdotOp : ArmSVE_Op<"udot",
214
- [Pure,
215
- AllTypesMatch<["src1", "src2"]>,
216
- AllTypesMatch<["acc", "dst"]>,
217
- ]> {
209
+ def UdotOp : ArmSVE_Op<"udot", [Pure,
210
+ AllTypesMatch<["src1", "src2"]>,
211
+ AllTypesMatch<["acc", "dst"]>]> {
218
212
let summary = "Vector-vector dot product and accumulate op";
219
213
let description = [{
220
214
UDOT: Unsigned integer addition of dot product.
@@ -241,11 +235,9 @@ def UdotOp : ArmSVE_Op<"udot",
241
235
"$acc `,` $src1 `,` $src2 attr-dict `:` type($src1) `to` type($dst)";
242
236
}
243
237
244
- def UmmlaOp : ArmSVE_Op<"ummla",
245
- [Pure,
246
- AllTypesMatch<["src1", "src2"]>,
247
- AllTypesMatch<["acc", "dst"]>,
248
- ]> {
238
+ def UmmlaOp : ArmSVE_Op<"ummla", [Pure,
239
+ AllTypesMatch<["src1", "src2"]>,
240
+ AllTypesMatch<["acc", "dst"]>]> {
249
241
let summary = "Matrix-matrix multiply and accumulate op";
250
242
let description = [{
251
243
UMMLA: Unsigned integer matrix multiply-accumulate.
@@ -273,14 +265,42 @@ def UmmlaOp : ArmSVE_Op<"ummla",
273
265
"$acc `,` $src1 `,` $src2 attr-dict `:` type($src1) `to` type($dst)";
274
266
}
275
267
268
+ def UsmmlaOp : ArmSVE_Op<"usmmla", [Pure,
269
+ AllTypesMatch<["src1", "src2"]>,
270
+ AllTypesMatch<["acc", "dst"]>]> {
271
+ let summary = "Matrix-matrix multiply and accumulate op";
272
+ let description = [{
273
+ USMMLA: Unsigned by signed integer matrix multiply-accumulate.
274
+
275
+ The unsigned by signed integer matrix multiply-accumulate operation
276
+ multiplies the 2×8 matrix of unsigned 8-bit integer values held
277
+ the first source vector by the 8×2 matrix of signed 8-bit integer
278
+ values in the second source vector. The resulting 2×2 widened 32-bit
279
+ integer matrix product is then added to the 32-bit integer matrix
280
+ accumulator.
281
+
282
+ Source:
283
+ https://developer.arm.com/documentation/100987/0000
284
+ }];
285
+ // Supports (vector<16xi8>, vector<16xi8>) -> (vector<4xi32>)
286
+ let arguments = (ins
287
+ ScalableVectorOfLengthAndType<[4], [I32]>:$acc,
288
+ ScalableVectorOfLengthAndType<[16], [I8]>:$src1,
289
+ ScalableVectorOfLengthAndType<[16], [I8]>:$src2
290
+ );
291
+ let results = (outs ScalableVectorOfLengthAndType<[4], [I32]>:$dst);
292
+ let assemblyFormat =
293
+ "$acc `,` $src1 `,` $src2 attr-dict `:` type($src1) `to` type($dst)";
294
+ }
295
+
276
296
class SvboolTypeConstraint<string lhsArg, string rhsArg> : TypesMatchWith<
277
297
"expected corresponding svbool type widened to [16]xi1",
278
298
lhsArg, rhsArg,
279
299
"VectorType(VectorType::Builder(::llvm::cast<VectorType>($_self)).setDim(::llvm::cast<VectorType>($_self).getRank() - 1, 16))">;
280
300
281
301
def ConvertFromSvboolOp : ArmSVE_Op<"convert_from_svbool",
282
- [Pure, SvboolTypeConstraint<"result", "source">]>
283
- {
302
+ [Pure,
303
+ SvboolTypeConstraint<"result", "source">]> {
284
304
let summary = "Convert a svbool type to a SVE predicate type";
285
305
let description = [{
286
306
Converts svbool types (`vector<[16]xi1>` or vectors of that type, e.g.
@@ -313,8 +333,8 @@ def ConvertFromSvboolOp : ArmSVE_Op<"convert_from_svbool",
313
333
}
314
334
315
335
def ConvertToSvboolOp : ArmSVE_Op<"convert_to_svbool",
316
- [Pure, SvboolTypeConstraint<"source", "result">]>
317
- {
336
+ [Pure,
337
+ SvboolTypeConstraint<"source", "result">]> {
318
338
let summary = "Convert a SVE predicate type to a svbool type";
319
339
let description = [{
320
340
Converts SVE predicate types (or vectors of predicate types, e.g.
@@ -356,10 +376,9 @@ def ZipInputVectorType : AnyTypeOf<[
356
376
Scalable1DVectorOfLength<16, [I8]>],
357
377
"an SVE vector with element size <= 64-bit">;
358
378
359
- def ZipX2Op : ArmSVE_Op<"zip.x2", [
360
- Pure,
361
- AllTypesMatch<["sourceV1", "sourceV2", "resultV1", "resultV2"]>]
362
- > {
379
+ def ZipX2Op : ArmSVE_Op<"zip.x2", [Pure,
380
+ AllTypesMatch<["sourceV1", "sourceV2",
381
+ "resultV1", "resultV2"]>]> {
363
382
let summary = "Multi-vector two-way zip op";
364
383
365
384
let description = [{
@@ -400,12 +419,11 @@ def ZipX2Op : ArmSVE_Op<"zip.x2", [
400
419
}];
401
420
}
402
421
403
- def ZipX4Op : ArmSVE_Op<"zip.x4", [
404
- Pure,
405
- AllTypesMatch<[
406
- "sourceV1", "sourceV2", "sourceV3", "sourceV4",
407
- "resultV1", "resultV2", "resultV3", "resultV4"]>]
408
- > {
422
+ def ZipX4Op
423
+ : ArmSVE_Op<"zip.x4",
424
+ [Pure,
425
+ AllTypesMatch<["sourceV1", "sourceV2", "sourceV3", "sourceV4",
426
+ "resultV1", "resultV2", "resultV3", "resultV4"]>]> {
409
427
let summary = "Multi-vector four-way zip op";
410
428
411
429
let description = [{
@@ -463,10 +481,7 @@ def ZipX4Op : ArmSVE_Op<"zip.x4", [
463
481
}];
464
482
}
465
483
466
- def PselOp : ArmSVE_Op<"psel", [
467
- Pure,
468
- AllTypesMatch<["p1", "result"]>,
469
- ]> {
484
+ def PselOp : ArmSVE_Op<"psel", [Pure, AllTypesMatch<["p1", "result"]>]> {
470
485
let summary = "Predicate select";
471
486
472
487
let description = [{
@@ -571,6 +586,10 @@ def SmmlaIntrOp :
571
586
ArmSVE_IntrBinaryOverloadedOp<"smmla">,
572
587
Arguments<(ins AnyScalableVectorOfAnyRank, AnyScalableVectorOfAnyRank, AnyScalableVectorOfAnyRank)>;
573
588
589
+ def UsmmlaIntrOp :
590
+ ArmSVE_IntrBinaryOverloadedOp<"usmmla">,
591
+ Arguments<(ins AnyScalableVectorOfAnyRank, AnyScalableVectorOfAnyRank, AnyScalableVectorOfAnyRank)>;
592
+
574
593
def SdotIntrOp :
575
594
ArmSVE_IntrBinaryOverloadedOp<"sdot">,
576
595
Arguments<(ins AnyScalableVectorOfAnyRank, AnyScalableVectorOfAnyRank, AnyScalableVectorOfAnyRank)>;
0 commit comments