// CHECK-NEXT: %[[CS:.*]] = shape.const_shape
// CHECK-NEXT: return %[[CS]]
%0 = shape.const_shape [2, 3, 4] : !shape.shape
- %1 = "shape.any"(%0, %arg) : (!shape.shape, !shape.shape) -> !shape.shape
+ %1 = shape.any %0, %arg : !shape.shape, !shape.shape -> !shape.shape
return %1 : !shape.shape
}
// CHECK-NEXT: %[[CS:.*]] = shape.const_shape [2, 3, 4] : tensor<?xindex>
// CHECK-NEXT: return %[[CS]] : tensor<?xindex>
%0 = shape.const_shape [2, 3, 4] : tensor<?xindex>
- %1 = "shape.any"(%0, %arg) : (tensor<?xindex>, tensor<?xindex>) -> tensor<?xindex>
+ %1 = shape.any %0, %arg : tensor<?xindex>, tensor<?xindex> -> tensor<?xindex>
return %1 : tensor<?xindex>
}
// Folding of any with partially constant operands is not yet implemented.
// CHECK-LABEL: func @f
func @f(%arg0 : !shape.shape, %arg1 : !shape.shape) -> !shape.shape {
- // CHECK-NEXT: %[[CS:.*]] = "shape.any"
+ // CHECK-NEXT: %[[CS:.*]] = shape.any
// CHECK-NEXT: return %[[CS]]
- %1 = "shape.any"(%arg0, %arg1) : (!shape.shape, !shape.shape) -> !shape.shape
+ %1 = shape.any %arg0, %arg1 : !shape.shape, !shape.shape -> !shape.shape
return %1 : !shape.shape
}
%2 = call @shape_equal_shapes(%a, %1) : (!shape.value_shape, !shape.value_shape) -> !shape.shape
return %2 : !shape.shape
}
+
+func @any_on_shape(%a : !shape.shape, %b : !shape.shape, %c : !shape.shape)
+ -> !shape.shape {
+ %result = shape.any %a, %b, %c
+ : !shape.shape, !shape.shape, !shape.shape -> !shape.shape
+ return %result : !shape.shape
+}
+
+func @any_on_mixed(%a : tensor<?xindex>,
+ %b : tensor<?xindex>,
+ %c : !shape.shape) -> !shape.shape {
+ %result = shape.any %a, %b, %c
+ : tensor<?xindex>, tensor<?xindex>, !shape.shape -> !shape.shape
+ return %result : !shape.shape
+}
+
+func @any_on_extent_tensors(%a : tensor<?xindex>,
+ %b : tensor<?xindex>,
+ %c : tensor<?xindex>) -> tensor<?xindex> {
+ %result = shape.any %a, %b, %c
+ : tensor<?xindex>, tensor<?xindex>, tensor<?xindex> -> tensor<?xindex>
+ return %result : tensor<?xindex>
+}