1 // # RUN: mlir-opt -test-print-invalid %s | FileCheck %s
2 // # RUN: mlir-opt -test-print-invalid %s --mlir-print-assume-verified | FileCheck %s --check-prefix=ASSUME-VERIFIED
4 // The pass creates some ops and prints them to stdout, the input is just an
8 // The operation is invalid because the body does not have a terminator, print
10 // CHECK: Invalid operation:
11 // CHECK-NEXT: "func.func"() ({
14 // CHECK-SAME: sym_name = "test"
16 // The operation is valid because the body has a terminator, print the custom
18 // CHECK: Valid operation:
19 // CHECK-NEXT: func @test() {
23 // With --mlir-print-assume-verified the custom form is printed in both cases.
24 // This works in this particular case, but may crash in general.
26 // ASSUME-VERIFIED: Invalid operation:
27 // ASSUME-VERIFIED-NEXT: func @test() {
28 // ASSUME-VERIFIED-NEXT: }
30 // ASSUME-VERIFIED: Valid operation:
31 // ASSUME-VERIFIED-NEXT: func @test() {
32 // ASSUME-VERIFIED-NEXT: return
33 // ASSUME-VERIFIED-NEXT: }