Navigation Menu

Skip to content

Commit

Permalink
[mlir] simplify type constraints in AVX512 dialect
Browse files Browse the repository at this point in the history
VectorOfLengthAndType accepts a cartesian product of given lengths and types
rather than types produced by co-indexed values in the corresponding lists.
Update the definitions accordingly. The type validity is already enforced by
op traits.

Reviewed By: nicolasvasilache, springerm

Differential Revision: https://reviews.llvm.org/D98327
  • Loading branch information
ftynse committed Mar 10, 2021
1 parent 2ce4caf commit 0af53de
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mlir/include/mlir/Dialect/AVX512/AVX512.td
Expand Up @@ -54,14 +54,14 @@ def MaskCompressOp : AVX512_Op<"mask.compress", [NoSideEffect,
remaining elements from `src`.
}];
let verifier = [{ return ::verify(*this); }];
let arguments = (ins VectorOfLengthAndType<[16, 16, 8, 8],
[I1, I1, I1, I1]>:$k,
VectorOfLengthAndType<[16, 16, 8, 8],
let arguments = (ins VectorOfLengthAndType<[16, 8],
[I1]>:$k,
VectorOfLengthAndType<[16, 8],
[F32, I32, F64, I64]>:$a,
Optional<VectorOfLengthAndType<[16, 16, 8, 8],
Optional<VectorOfLengthAndType<[16, 8],
[F32, I32, F64, I64]>>:$src,
OptionalAttr<ElementsAttr>:$constant_src);
let results = (outs VectorOfLengthAndType<[16, 16, 8, 8],
let results = (outs VectorOfLengthAndType<[16, 8],
[F32, I32, F64, I64]>:$dst);
let assemblyFormat = "$k `,` $a (`,` $src^)? attr-dict"
" `:` type($dst) (`,` type($src)^)?";
Expand Down Expand Up @@ -162,8 +162,8 @@ def Vp2IntersectOp : AVX512_Op<"vp2intersect", [NoSideEffect,
let arguments = (ins VectorOfLengthAndType<[16, 8], [I32, I64]>:$a,
VectorOfLengthAndType<[16, 8], [I32, I64]>:$b
);
let results = (outs VectorOfLengthAndType<[16, 8], [I1, I1]>:$k1,
VectorOfLengthAndType<[16, 8], [I1, I1]>:$k2
let results = (outs VectorOfLengthAndType<[16, 8], [I1]>:$k1,
VectorOfLengthAndType<[16, 8], [I1]>:$k2
);
let assemblyFormat =
"$a `,` $b attr-dict `:` type($a)";
Expand Down

0 comments on commit 0af53de

Please sign in to comment.