Files
clang-p2996/mlir/test/Integration/Dialect/Vector/CPU/test-print-str.mlir
Aart Bik c1b8c6cf41 [mlir][vector][print] do not append newline to printing pure strings (#83213)
Since the vector.print str provides no punctuation control, it is
slightly more flexible to let the client of this operation decide
whether there should be a trailing newline. This allows for printing
like

vector.print str "nse = "
vector.print %nse : index

as

nse = 42
2024-02-28 10:18:21 -08:00

15 lines
403 B
MLIR

// RUN: mlir-opt %s -test-lower-to-llvm | \
// RUN: mlir-cpu-runner -e entry -entry-point-result=void \
// RUN: -shared-libs=%mlir_c_runner_utils,%mlir_runner_utils | \
// RUN: FileCheck %s
/// This tests printing (multiple) string literals works.
func.func @entry() {
// CHECK: Hello, World!
vector.print str "Hello, World!\n"
// CHECK-NEXT: Bye!
vector.print str "Bye!\n"
return
}