1 // RUN: mlir-opt %s -split-input-file -verify-diagnostics
3 func.func @ins_1_index_outs_none_results_1_index(%arg0 : index) -> index {
4 %0 = test.destination_style_op ins(%arg0 : index) -> index
10 func.func @ins_1_index_outs_1_tensor_results_1_index(%arg0 : index, %arg1 : tensor<2x2xf32>) -> index {
11 // expected-error @+1 {{op expected the number of tensor results (0) to be equal to the number of output tensors (1)}}
12 %0 = test.destination_style_op ins(%arg0 : index) outs(%arg1 : tensor<2x2xf32>) -> index
13 func.return %0 : index
18 func.func @ins_1_tensor_outs_none_results_1_index(%arg0 :tensor<2x2xf32>) -> index {
19 %0 = test.destination_style_op ins(%arg0 : tensor<2x2xf32>) -> index
20 func.return %0 : index
25 func.func @ins_1_tensor_outs_1_tensor_results_1_index(%arg0 :tensor<2x2xf32>, %arg1 : tensor<2x2xf32>) -> index {
26 // expected-error @+1 {{op expected the number of tensor results (0) to be equal to the number of output tensors (1)}}
27 %0 = test.destination_style_op ins(%arg0 : tensor<2x2xf32>) outs(%arg1 : tensor<2x2xf32>) -> index
28 func.return %0 : index
33 func.func @ins_1_index_outs_none_results_1_tensor(%arg0 : index) -> tensor<2x2xf32> {
34 // expected-error @+1 {{op expected the number of tensor results (1) to be equal to the number of output tensors (0)}}
35 %0 = test.destination_style_op ins(%arg0 : index) -> tensor<2x2xf32>
36 func.return %0 : tensor<2x2xf32>
41 func.func @ins_1_index_outs_1_tensor_results_1_tensor(%arg0 : index, %arg1 : tensor<2x2xf32>) -> tensor<2x2xf32> {
42 %0 = test.destination_style_op ins(%arg0 : index) outs(%arg1 : tensor<2x2xf32>) -> tensor<2x2xf32>
43 func.return %0 : tensor<2x2xf32>
48 func.func @ins_1_tensor_outs_none_results_1_tensor(%arg0 :tensor<2x2xf32>) -> tensor<2x2xf32> {
49 // expected-error @+1 {{op expected the number of tensor results (1) to be equal to the number of output tensors (0)}}
50 %0 = test.destination_style_op ins(%arg0 : tensor<2x2xf32>) -> tensor<2x2xf32>
51 func.return %0 : tensor<2x2xf32>
56 func.func @ins_1_tensor_outs_1_tensor_results_1_tensor(%arg0 :tensor<2x2xf32>, %arg1 : tensor<2x2xf32>) -> tensor<2x2xf32> {
57 %0 = test.destination_style_op ins(%arg0 : tensor<2x2xf32>) outs(%arg1 : tensor<2x2xf32>) -> tensor<2x2xf32>
58 func.return %0 : tensor<2x2xf32>