brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · b94345c Raw
33 lines · plain
1// RUN: mlir-opt %s -test-lower-to-arm-sme -test-lower-to-llvm | \2// RUN: %mcr_aarch64_cmd \3// RUN:  -march=aarch64 -mattr=+sve,+sme \4// RUN:  -e entry -entry-point-result=i32 \5// RUN:  -shared-libs=%native_mlir_runner_utils,%native_mlir_c_runner_utils,%native_arm_sme_abi_shlib | \6// RUN: FileCheck %s7 8// Integration test demonstrating filling a 32-bit element ZA tile with a9// non-zero constant via vector to tile (MOVA) ops.10 11func.func @entry() -> i32 {12  // Fill a tile with '123'. This will get lowered to a 1-d vector splat of13  // '123' and a loop that writes this vector to each tile slice in the ZA14  // tile.15  %tile = arith.constant dense<123> : vector<[4]x[4]xi32>16 17  // Print the tile. The smallest SVL is 128-bits so the tile will be at least18  // 4x4xi32.19  //20  // CHECK:      TILE BEGIN21  // CHECK-NEXT: ( 123, 123, 123, 12322  // CHECK-NEXT: ( 123, 123, 123, 12323  // CHECK-NEXT: ( 123, 123, 123, 12324  // CHECK-NEXT: ( 123, 123, 123, 12325  // CHECK:      TILE END26  vector.print str "TILE BEGIN\n"27  vector.print %tile : vector<[4]x[4]xi32>28  vector.print str "TILE END\n"29 30  %c0_i32 = arith.constant 0 : i3231  return %c0_i32 : i3232}33