1// RUN: mlir-opt %s -convert-elementwise-to-linalg -std-bufferize -tensor-constant-bufferize -linalg-bufferize -func-bufferize -convert-linalg-to-loops -convert-linalg-to-llvm -convert-std-to-llvm | \
2// RUN: mlir-cpu-runner -e main -entry-point-result=void \
3// RUN:   -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \
4// RUN: | FileCheck %s
5
6func @main() {
7  %a = constant dense<[1.0, 2.0, 3.0]> : tensor<3xf32>
8  %b = constant dense<[10.0, 20.0, 30.0]> : tensor<3xf32>
9
10  %addf = addf %a, %b : tensor<3xf32>
11  %addf_unranked = tensor_cast %addf : tensor<3xf32> to tensor<*xf32>
12  call @print_memref_f32(%addf_unranked) : (tensor<*xf32>) -> ()
13  // CHECK: Unranked Memref base@ = {{.*}} rank = 1 offset = 0 sizes = [3] strides = [1] data =
14  // CHECK-NEXT: [11,  22,  33]
15
16  return
17}
18
19func private @print_memref_f32(%ptr : tensor<*xf32>)
20