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