Files
clang-p2996/mlir/test/Integration/Dialect/Vector/CPU/interleave.mlir
Andrea Faulds eb206e9ea8 [mlir] Rename mlir-cpu-runner to mlir-runner (#123776)
With the removal of mlir-vulkan-runner (as part of #73457) in
e7e3c45bc7, mlir-cpu-runner is now the
only runner for all CPU and GPU targets, and the "cpu" name has been
misleading for some time already. This commit renames it to mlir-runner.
2025-01-24 14:08:38 +01:00

25 lines
734 B
MLIR

// RUN: mlir-opt %s -test-lower-to-llvm | \
// RUN: mlir-runner -e entry -entry-point-result=void \
// RUN: -shared-libs=%mlir_c_runner_utils | \
// RUN: FileCheck %s
func.func @entry() {
%f1 = arith.constant 1.0 : f32
%f2 = arith.constant 2.0 : f32
%v1 = vector.splat %f1 : vector<2x4xf32>
%v2 = vector.splat %f2 : vector<2x4xf32>
vector.print %v1 : vector<2x4xf32>
vector.print %v2 : vector<2x4xf32>
//
// Test vectors:
//
// CHECK: ( ( 1, 1, 1, 1 ), ( 1, 1, 1, 1 ) )
// CHECK: ( ( 2, 2, 2, 2 ), ( 2, 2, 2, 2 ) )
%v3 = vector.interleave %v1, %v2 : vector<2x4xf32> -> vector<2x8xf32>
vector.print %v3 : vector<2x8xf32>
// CHECK: ( ( 1, 2, 1, 2, 1, 2, 1, 2 ), ( 1, 2, 1, 2, 1, 2, 1, 2 ) )
return
}