29 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 %f3 = arith.constant 3.0: f329 %f7 = arith.constant 7.0: f3210 %v1 = vector.broadcast %f1 : f32 to vector<8xf32>11 %v3 = vector.broadcast %f3 : f32 to vector<8xf32>12 %v7 = vector.broadcast %f7 : f32 to vector<8xf32>13 vector.print %v1 : vector<8xf32>14 vector.print %v3 : vector<8xf32>15 vector.print %v7 : vector<8xf32>16 //17 // test vectors:18 //19 // CHECK: ( 1, 1, 1, 1, 1, 1, 1, 1 )20 // CHECK: ( 3, 3, 3, 3, 3, 3, 3, 3 )21 // CHECK: ( 7, 7, 7, 7, 7, 7, 7, 7 )22 23 %v = vector.fma %v3, %v7, %v1: vector<8xf32>24 vector.print %v : vector<8xf32>25 // CHECK: ( 22, 22, 22, 22, 22, 22, 22, 22 )26 27 return28}29