brintos

brintos / llvm-project-archived public Read only

0
0
Text · 756 B · 740c742 Raw
25 lines · plain
1// RUN: mlir-opt %s -test-lower-to-llvm | \2// RUN: mlir-runner -e entry -entry-point-result=void  \3// RUN:   -shared-libs=%mlir_c_runner_utils | \4// RUN: FileCheck %s5 6func.func @entry() {7  %f1 = arith.constant 1.0 : f328  %f2 = arith.constant 2.0 : f329  %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.interleave %v1, %v2 : vector<2x4xf32> -> vector<2x8xf32>20  vector.print %v3 : vector<2x8xf32>21  // CHECK: ( ( 1, 2, 1, 2, 1, 2, 1, 2 ), ( 1, 2, 1, 2, 1, 2, 1, 2 ) )22 23  return24}25