2022-10-18 18:44:11 +00:00
|
|
|
// RUN: not mlir-opt %s -pass-pipeline='builtin.module(func.func(test-pass-create-invalid-ir{emit-invalid-ir=true signal-pass-failure=true}))' -mlir-print-ir-after-failure 2>&1 | FileCheck %s --check-prefix=CHECK-GENERIC
|
|
|
|
// RUN: not mlir-opt %s -pass-pipeline='builtin.module(func.func(test-pass-create-invalid-ir{emit-invalid-ir=true signal-pass-failure=false}))' -mlir-print-ir-after-failure 2>&1 | FileCheck %s --check-prefix=CHECK-GENERIC
|
|
|
|
// RUN: not mlir-opt %s -pass-pipeline='builtin.module(func.func(test-pass-create-invalid-ir{emit-invalid-ir=false signal-pass-failure=true}))' -mlir-print-ir-after-failure 2>&1 | FileCheck %s --check-prefix=CHECK-CUSTOM
|
|
|
|
// RUN: mlir-opt %s -pass-pipeline='builtin.module(func.func(test-pass-create-invalid-ir{emit-invalid-ir=false signal-pass-failure=false}))' -mlir-print-ir-after-failure 2>&1 | FileCheck %s --check-prefix=CHECK-CUSTOM
|
2022-04-20 20:39:44 +00:00
|
|
|
|
|
|
|
// Check that `-mlir-print-assume-verified` will print custom even when the IR is invalid.
|
2022-10-18 18:44:11 +00:00
|
|
|
// RUN: not mlir-opt %s -pass-pipeline='builtin.module(func.func(test-pass-create-invalid-ir{emit-invalid-ir=true signal-pass-failure=true}))' -mlir-print-ir-after-failure 2>&1 -mlir-print-assume-verified | FileCheck %s --check-prefix=CHECK-CUSTOM
|
|
|
|
// RUN: not mlir-opt %s -pass-pipeline='builtin.module(func.func(test-pass-create-invalid-ir{emit-invalid-ir=true signal-pass-failure=false}))' -mlir-print-ir-after-failure 2>&1 -mlir-print-assume-verified | FileCheck %s --check-prefix=CHECK-CUSTOM
|
2022-04-19 17:26:33 +00:00
|
|
|
|
|
|
|
// Test whether we print generically or not on pass failure, depending on whether there is invalid IR or not.
|
|
|
|
|
2022-04-20 20:39:44 +00:00
|
|
|
// CHECK-CUSTOM: func @TestCreateInvalidCallInPass
|
|
|
|
// CHECK-GENERIC: "func.func"
|
2022-04-20 23:22:03 +00:00
|
|
|
func.func @TestCreateInvalidCallInPass() {
|
2022-04-19 17:26:33 +00:00
|
|
|
return
|
|
|
|
}
|