From 0af53de3699997d04bc0e23f6b366c26a4a9268b Mon Sep 17 00:00:00 2001 From: Alex Zinenko Date: Wed, 10 Mar 2021 11:45:53 +0100 Subject: [PATCH] [mlir] simplify type constraints in AVX512 dialect 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 --- mlir/include/mlir/Dialect/AVX512/AVX512.td | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mlir/include/mlir/Dialect/AVX512/AVX512.td b/mlir/include/mlir/Dialect/AVX512/AVX512.td index c2487a0..391ce74 100644 --- a/mlir/include/mlir/Dialect/AVX512/AVX512.td +++ b/mlir/include/mlir/Dialect/AVX512/AVX512.td @@ -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>:$src, OptionalAttr:$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)^)?"; @@ -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)"; -- 2.7.4