[Mlir-commits] [mlir] [mlir][arith] Add printing integration tests (PR #98184)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Aug 26 12:10:09 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
----------------
banach-space wrote:
> 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).
I advocated for keeping them in separate files - to make sure the tests are minimal and to make it easier to identify what's being tested. That has made reviewing much easier, but I didn't really think about the runtime cost. Consolidation makes sense, but l'd wait until all PR's from https://github.com/llvm/llvm-project/issues/100121 are complete. Is that OK?
https://github.com/llvm/llvm-project/pull/98184
More information about the Mlir-commits
mailing list