Skip to content

Commit 1beaad3

Browse files
committed
Add test for variandic + one norm input
1 parent dab5535 commit 1beaad3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mlir/test/mlir-tblgen/op-result.td

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,18 @@ def OpL6 : NS_Op<"op_with_same_and_constraint_results",
203203
// CHECK: inferredReturnTypes[1] = odsInferredType1;
204204
// CHECK: inferredReturnTypes[2] = odsInferredType2;
205205

206+
def OpL7 : NS_Op<"one_variadic_and_one_normal_operand_with_infer_result_op",
207+
[TypesMatchWith<"", "input2", "output1", "infer0($_self)">]> {
208+
let arguments = (ins Variadic<AnyTensor>:$input1, AnyTensor:$input2);
209+
let results = (outs AnyTensor:$output1);
210+
}
211+
212+
// CHECK-LABEL: LogicalResult OpL7::inferReturnTypes
213+
// CHECK-NOT: }
214+
// CHECK: OpL7::Adaptor adaptor
215+
// CHECK: odsInferredType0 = infer0(adaptor.getInput2().getType())
216+
// CHECK: inferredReturnTypes[0] = odsInferredType0
217+
206218
def OpM : NS_Op<"mix_diff_size_variadic_and_normal_results_op", [AttrSizedResultSegments]> {
207219
let results = (outs Variadic<AnyTensor>:$output1, AnyTensor:$output2, Optional<AnyTensor>:$output3);
208220
}

0 commit comments

Comments
 (0)