diff --git a/mlir/test/IR/traits.mlir b/mlir/test/IR/traits.mlir --- a/mlir/test/IR/traits.mlir +++ b/mlir/test/IR/traits.mlir @@ -89,11 +89,12 @@ // ----- // CHECK: succeededSameOperandShape -func @succeededSameOperandShape(%t10x10 : tensor<10x10xf32>, %t1: tensor<1xf32>, %m10x10 : memref<10x10xi32>, %tr: tensor<*xf32>) { +func @succeededSameOperandShape(%t10x10 : tensor<10x10xf32>, %t1: tensor<1xf32>, %m10x10 : memref<10x10xi32>, %tr: tensor<*xf32>, %i1: i1, %i2: i2) { "test.same_operand_shape"(%t1, %t1) : (tensor<1xf32>, tensor<1xf32>) -> () "test.same_operand_shape"(%t10x10, %t10x10) : (tensor<10x10xf32>, tensor<10x10xf32>) -> () "test.same_operand_shape"(%t1, %tr) : (tensor<1xf32>, tensor<*xf32>) -> () "test.same_operand_shape"(%t10x10, %m10x10) : (tensor<10x10xf32>, memref<10x10xi32>) -> () + "test.same_operand_shape"(%i1, %i2) : (i1, i2) -> () return } @@ -114,12 +115,13 @@ // ----- // CHECK: succeededSameOperandAndResultShape -func @succeededSameOperandAndResultShape(%t10x10 : tensor<10x10xf32>, %t1: tensor<1xf32>, %tr: tensor<*xf32>, %t1d: tensor) { +func @succeededSameOperandAndResultShape(%t10x10 : tensor<10x10xf32>, %t1: tensor<1xf32>, %tr: tensor<*xf32>, %t1d: tensor, %i1: i1) { "test.same_operand_and_result_shape"(%t1, %t1) : (tensor<1xf32>, tensor<1xf32>) -> tensor<1xf32> "test.same_operand_and_result_shape"(%t10x10, %t10x10) : (tensor<10x10xf32>, tensor<10x10xf32>) -> tensor<10x10xf32> "test.same_operand_and_result_shape"(%t1, %tr) : (tensor<1xf32>, tensor<*xf32>) -> tensor<1xf32> "test.same_operand_and_result_shape"(%t1, %t1d) : (tensor<1xf32>, tensor) -> tensor<1xf32> "test.same_operand_and_result_shape"(%t1, %t1d) : (tensor<1xf32>, tensor) -> memref<1xf32> + "test.same_operand_and_result_shape"(%i1) : (i1) -> (i2) return } @@ -599,4 +601,4 @@ // expected-error@+1 {{'attr' attribute should have trait 'TestAttrTrait'}} "test.attr_with_trait"() {attr = 42 : i32} : () -> () return -} \ No newline at end of file +} diff --git a/mlir/test/lib/Dialect/Test/TestOps.td b/mlir/test/lib/Dialect/Test/TestOps.td --- a/mlir/test/lib/Dialect/Test/TestOps.td +++ b/mlir/test/lib/Dialect/Test/TestOps.td @@ -418,13 +418,13 @@ } def SameOperandShapeOp : TEST_Op<"same_operand_shape", [SameOperandsShape]> { - let arguments = (ins Variadic); + let arguments = (ins Variadic); } def SameOperandAndResultShapeOp : TEST_Op<"same_operand_and_result_shape", [SameOperandsAndResultShape]> { - let arguments = (ins Variadic); - let results = (outs Variadic); + let arguments = (ins Variadic); + let results = (outs Variadic); } def SameOperandAndResultTypeOp : TEST_Op<"same_operand_and_result_type",