xref: /llvm-project/mlir/test/Transforms/test-rewrite-dynamic-op.mlir (revision a8308020ac2fce5ad7d616b2dbdbe7ccae0585a4)
1// RUN: mlir-opt %s -test-rewrite-dynamic-op | FileCheck %s
2
3// Test that `test.one_operand_two_results` is replaced with
4// `test.generic_dynamic_op`.
5
6// CHECK-LABEL: func @rewrite_dynamic_op
7func.func @rewrite_dynamic_op(%arg0: i32) {
8  // CHECK-NEXT: %{{.*}}:2 = "test.dynamic_generic"(%arg0) : (i32) -> (i32, i32)
9  %0:2 = "test.dynamic_one_operand_two_results"(%arg0) : (i32) -> (i32, i32)
10  // CHECK-NEXT: return
11  return
12}
13