@@ -115,12 +115,23 @@ def OpK : NS_Op<"only_input_is_variadic_with_same_value_type_op", [SameOperandsA
115
115
116
116
// Test with inferred shapes and interleaved with operands/attributes.
117
117
//
118
- def OpL : NS_Op<"op_with_all_types_constraint",
118
+ def OpL1 : NS_Op<"op_with_all_types_constraint",
119
119
[AllTypesMatch<["a", "b"]>]> {
120
120
let arguments = (ins I32Attr:$attr1, AnyType:$a);
121
121
let results = (outs Res<AnyType, "output b", []>:$b);
122
122
}
123
123
124
- // CHECK-LABEL: LogicalResult OpL ::inferReturnTypes
124
+ // CHECK-LABEL: LogicalResult OpL1 ::inferReturnTypes
125
125
// CHECK-NOT: }
126
126
// CHECK: inferredReturnTypes[0] = operands[0].getType();
127
+
128
+ def OpL2 : NS_Op<"op_with_all_types_constraint",
129
+ [AllTypesMatch<["c", "b"]>, AllTypesMatch<["a", "d"]>]> {
130
+ let arguments = (ins I32Attr:$attr1, AnyType:$a, AnyType:$a2, AnyType:$c);
131
+ let results = (outs Res<AnyType, "output b", []>:$b, AnyType:$d);
132
+ }
133
+
134
+ // CHECK-LABEL: LogicalResult OpL2::inferReturnTypes
135
+ // CHECK-NOT: }
136
+ // CHECK: inferredReturnTypes[0] = operands[2].getType();
137
+ // CHECK: inferredReturnTypes[1] = operands[0].getType();
0 commit comments