diff options
Diffstat (limited to 'mlir/test/Integration/Dialect/Vector/CPU/ArmSME/tile-fill.mlir')
-rw-r--r-- | mlir/test/Integration/Dialect/Vector/CPU/ArmSME/tile-fill.mlir | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/tile-fill.mlir b/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/tile-fill.mlir new file mode 100644 index 0000000..3d74508 --- /dev/null +++ b/mlir/test/Integration/Dialect/Vector/CPU/ArmSME/tile-fill.mlir @@ -0,0 +1,32 @@ +// RUN: mlir-opt %s -test-lower-to-arm-sme -test-lower-to-llvm | \ +// RUN: %mcr_aarch64_cmd \ +// RUN: -march=aarch64 -mattr=+sve,+sme \ +// RUN: -e entry -entry-point-result=i32 \ +// RUN: -shared-libs=%mlir_runner_utils,%mlir_c_runner_utils,%arm_sme_abi_shlib | \ +// RUN: FileCheck %s + +// Integration test demonstrating filling a 32-bit element ZA tile with a +// non-zero constant via vector to tile (MOVA) ops. + +func.func @entry() -> i32 { + // Fill a tile with '123'. This will get lowered to a 1-d vector splat of + // '123' and a loop that writes this vector to each tile slice in the ZA + // tile. + %tile = arith.constant dense<123> : vector<[4]x[4]xi32> + + // Print the tile. The smallest SVL is 128-bits so the tile will be at least + // 4x4xi32. + // + // CHECK: TILE BEGIN + // CHECK-NEXT: ( 123, 123, 123, 123 + // CHECK-NEXT: ( 123, 123, 123, 123 + // CHECK-NEXT: ( 123, 123, 123, 123 + // CHECK-NEXT: ( 123, 123, 123, 123 + // CHECK: TILE END + vector.print str "TILE BEGIN\n" + vector.print %tile : vector<[4]x[4]xi32> + vector.print str "TILE END\n" + + %c0_i32 = arith.constant 0 : i32 + return %c0_i32 : i32 +} |