1// RUN: mlir-hlo-opt %s -pass-pipeline='func.func(canonicalize)' | FileCheck %s
2
3// CHECK-LABEL: func @single_operand
4// CHECK-SAME: [[ARG:%[a-zA-Z0-9]+]]
5func.func @single_operand(%arg: tensor<1x2xf32>) -> tensor<1x2xf32> {
6  %0 = "mhlo.concatenate"(%arg) {dimension = 0 : i64} : (tensor<1x2xf32>) -> tensor<1x2xf32>
7  // CHECK-NEXT: return [[ARG]]
8  func.return %0 : tensor<1x2xf32>
9}
10
11// -----
12
13// CHECK-LABEL: func @operand_with_unknown_rank
14func.func @operand_with_unknown_rank(%arg0: tensor<*xf32>, %arg1: tensor<*xf32>) -> tensor<*xf32> {
15  // CHECK-NEXT: mhlo.concatenate
16  %0 = "mhlo.concatenate"(%arg0, %arg1) {dimension = 0 : i64} : (tensor<*xf32>, tensor<*xf32>) -> tensor<*xf32>
17  // CHECK-NEXT: return
18  func.return %0 : tensor<*xf32>
19}
20