[Mlir-commits] [mlir] [mlir] Add `mlir_arm_runner_utils` library for use in integration tests (PR #78583)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Jan 18 09:11:12 PST 2024
================
@@ -0,0 +1,34 @@
+// DEFINE: %{entry_point} = main
+// DEFINE: %{compile} = mlir-opt %s -convert-arm-sme-to-llvm \
+// DEFINE: -cse -canonicalize -test-lower-to-llvm
+// DEFINE: %{run} = %mcr_aarch64_cmd \
+// DEFINE: -march=aarch64 -mattr=+sve,+sme \
+// DEFINE: -e %{entry_point} -entry-point-result=void \
+// DEFINE: -shared-libs=%mlir_runner_utils,%mlir_c_runner_utils,%mlir_arm_runner_utils
+
+// RUN: %{compile} | %{run} | FileCheck %s
+
+func.func @checkVScale() {
+ %vscale = vector.vscale
+ vector.print str "vscale"
+ vector.print %vscale : index
+ return
+}
+
+func.func @main() {
+ // CHECK: vscale
+ // CHECK-NEXT: 1
+ %c128 = arith.constant 128 : i32
+ func.call @setArmVLBits(%c128) : (i32) -> ()
+ func.call @checkVScale() : () -> ()
+
+ // CHECK: vscale
+ // CHECK-NEXT: 2
+ %c256 = arith.constant 256 : i32
----------------
banach-space wrote:
[nit] I'd try the architecture max - 2048.
https://github.com/llvm/llvm-project/pull/78583
More information about the Mlir-commits
mailing list