[Mlir-commits] [mlir] [mlir][arith] Add printing integration tests (PR #98184)

Jakub Kuderski llvmlistbot at llvm.org
Sun Aug 25 11:11:51 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
----------------
kuhar wrote:

Could we use either 0 / 1 or false / true for consistency here?

https://github.com/llvm/llvm-project/pull/98184


More information about the Mlir-commits mailing list