[Mlir-commits] [mlir] [mlir][arith] Add printing integration tests (PR #98184)
Mehdi Amini
llvmlistbot at llvm.org
Sun Aug 25 12:28:32 PDT 2024
================
@@ -0,0 +1,47 @@
+// RUN: mlir-opt %s --convert-scf-to-cf --convert-cf-to-llvm --convert-vector-to-llvm \
+// RUN: --convert-func-to-llvm --convert-arith-to-llvm | \
+// RUN: mlir-cpu-runner -e entry -entry-point-result=void \
+// RUN: --shared-libs=%mlir_c_runner_utils | \
+// RUN: FileCheck %s --match-full-lines
+
+func.func @i1() {
+ // printing i1 values
+ // print(0 : i1) = '0'; print(1 : i1) = '1'; print(-1 : i1) = '1'
+ // CHECK: 0
+ // CHECK-NEXT: 1
+ // CHECK-NEXT: 1
+ %false = arith.constant false
+ %true = arith.constant 1 : i1
+ %true_as_n1 = arith.constant -1 : i1
+ vector.print %false : i1
+ vector.print %true : i1
+ vector.print %true_as_n1 : i1
----------------
joker-eph wrote:
>From what I can tell, this is not testing anything about arith is it? Seems like this is all about testing "vector.print" in itself, or even just the testing runtime we have.
Can you try to make the file location more relevant?
Can we also consolidate all the testing for the runtime in a single execution? (each new lit test isn't free: it'll fork/exec a compiler process, and then execute the result here).
https://github.com/llvm/llvm-project/pull/98184
More information about the Mlir-commits
mailing list