38 lines · plain
1// Check that (1) the output split marker is inserted and (2) the input file is2// split using the default split marker.3// RUN: mlir-translate %s -split-input-file -mlir-to-llvmir \4// RUN: -output-split-marker="; -----" \5// RUN: | FileCheck -check-prefix=CHECK-OUTPUT %s6 7// With the second command, check that (3) the input split marker is used and8// (4) the output split marker is empty if not specified.9// RUN: mlir-translate %s -split-input-file="// ""-----" -mlir-to-llvmir \10// RUN: -output-split-marker="; -----" \11// RUN: | mlir-translate -split-input-file -import-llvm \12// RUN: -split-input-file="; -----" \13// RUN: | FileCheck -check-prefix=CHECK-ROUNDTRIP %s14 15// Check that (5) the input is not split if `-split-input-file` is not given.16// RUN: mlir-translate %s -mlir-to-llvmir \17// RUN: | FileCheck -check-prefix=CHECK-NOSPLIT %s18 19// CHECK-OUTPUT: ModuleID20// CHECK-OUTPUT: ; -----21// CHECK-OUTPUT-NEXT: ModuleID22 23// CHECK-ROUNDTRIP: module {{.*}} {24// FIXME: importer forces debug info version even without importing one.25// CHECK-ROUNDTRIP-NEXT: llvm.module_flag26// CHECK-ROUNDTRIP-NEXT: }27// CHECK-ROUNDTRIP-EMPTY:28// CHECK-ROUNDTRIP: module29 30// CHECK-NOSPLIT: ModuleID31// CHECK-NOSPLIT-NOT: ModuleID32 33module {}34 35// -----36 37module {}38