[PATCH] D74179: [mlir][VectorOps] Generalized vector.print to i32/i64

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 05:00:46 PST 2020


ftynse accepted this revision.
ftynse marked an inline comment as done.
ftynse added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir:403
+// CHECK-LABEL: llvm.func @vector_print_scalar_i32
+// CHECK-SAME: %[[A:arg[0-9]+]]: !llvm.i32
+//       CHECK:    llvm.call @print_i32(%[[A]]) : (!llvm.i32) -> ()
----------------
Nit: let's drop the `arg[0-9]+` pattern and just use `.*`, we don't guarantee anything on SSA names


================
Comment at: mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp:81
+// details of our vectors. Also useful for direct LLVM IR output.
+extern "C" void print_i32(int32_t i) { fprintf(stdout, "%" PRId32, i); }
+extern "C" void print_i64(int64_t l) { fprintf(stdout, "%" PRId64, l); }
----------------
Cool, I did not know these macros existed!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74179/new/

https://reviews.llvm.org/D74179





More information about the llvm-commits mailing list