1// RUN: mlir-opt %s -convert-scf-to-std -convert-vector-to-llvm -convert-std-to-llvm | \
2// RUN: mlir-cpu-runner -e entry -entry-point-result=void  \
3// RUN:   -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
4// RUN: FileCheck %s
5
6func @entry() {
7  %f1 = constant 1.0: f32
8  %f2 = constant 2.0: f32
9  %v1 = vector.broadcast %f1 : f32 to vector<2x4xf32>
10  %v2 = vector.broadcast %f2 : f32 to vector<2x4xf32>
11  vector.print %v1 : vector<2x4xf32>
12  vector.print %v2 : vector<2x4xf32>
13  //
14  // test vectors:
15  //
16  // CHECK: ( ( 1, 1, 1, 1 ), ( 1, 1, 1, 1 ) )
17  // CHECK: ( ( 2, 2, 2, 2 ), ( 2, 2, 2, 2 ) )
18
19  %v3 = vector.shuffle %v1, %v2 [3, 1, 2] : vector<2x4xf32>, vector<2x4xf32>
20  vector.print %v3 : vector<3x4xf32>
21  // CHECK: ( ( 2, 2, 2, 2 ), ( 1, 1, 1, 1 ), ( 2, 2, 2, 2 ) )
22
23  return
24}
25