1// RUN: tf-opt %s -inline='default-pipeline=''' | FileCheck %s
2
3// Inline a function that contains only tfl ops.
4func @func_with_tfl_ops(%arg0 : tensor<2xi32>) -> tensor<2xi32> {
5  %0 = "tfl.sub"(%arg0, %arg0) {fused_activation_function = "RELU6"} : (tensor<2xi32>, tensor<2xi32>) -> tensor<2xi32>
6  %1 = "tfl.add"(%0, %arg0) {fused_activation_function = "RELU6"} : (tensor<2xi32>, tensor<2xi32>) -> tensor<2xi32>
7  return %1: tensor<2xi32>
8}
9
10// CHECK-LABEL: func @inline_with_arg
11// CHECK-SAME:    [[VAL_0:%.*]]: tensor<2xi32>
12func @inline_with_arg(%arg0 : tensor<2xi32>) -> tensor<2xi32> {
13// CHECK-NEXT:  [[VAL_1:%.*]] = tfl.sub [[VAL_0]], [[VAL_0]] {fused_activation_function = "RELU6"} : tensor<2xi32>
14// CHECK-NEXT:  [[VAL_2:%.*]] = tfl.add [[VAL_1]], [[VAL_0]] {fused_activation_function = "RELU6"} : tensor<2xi32>
15// CHECK-NEXT:  return [[VAL_2]] : tensor<2xi32>
16  %0 = call @func_with_tfl_ops(%arg0) : (tensor<2xi32>) -> tensor<2xi32>
17  return %0 : tensor<2xi32>
18}
19