xref: /llvm-project/mlir/test/Bytecode/invalid/invalid-ir_section.mlir (revision bb0bbed610d86ba155f9c066c23038f7f34e2dbb)
1// This file contains various failure test cases related to the structure of
2// the IR section.
3
4//===--------------------------------------------------------------------===//
5// Operations
6//===--------------------------------------------------------------------===//
7
8//===--------------------------------------------------------------------===//
9// Name
10
11// RUN: not mlir-opt %S/invalid-ir_section-opname.mlirbc -allow-unregistered-dialect 2>&1 | FileCheck %s --check-prefix=OP_NAME
12// OP_NAME: invalid operation name index: 14
13
14//===--------------------------------------------------------------------===//
15// Loc
16
17// RUN: not mlir-opt %S/invalid-ir_section-loc.mlirbc -allow-unregistered-dialect 2>&1 | FileCheck %s --check-prefix=OP_LOC
18// OP_LOC: expected attribute of type: {{.*}}, but got: {attra = 10 : i64, attrb = #bytecode.attr}
19
20//===--------------------------------------------------------------------===//
21// Attr
22
23// RUN: not mlir-opt %S/invalid-ir_section-attr.mlirbc -allow-unregistered-dialect 2>&1 | FileCheck %s --check-prefix=OP_ATTR
24// OP_ATTR: expected attribute of type: {{.*}}, but got: loc(unknown)
25
26//===--------------------------------------------------------------------===//
27// Operands
28
29// RUN: not mlir-opt %S/invalid-ir_section-operands.mlirbc -allow-unregistered-dialect 2>&1 | FileCheck %s --check-prefix=OP_OPERANDS
30// OP_OPERANDS: invalid value index: 6
31
32// RUN: not mlir-opt %S/invalid-ir_section-forwardref.mlirbc -allow-unregistered-dialect 2>&1 | FileCheck %s --check-prefix=FORWARD_REF
33// FORWARD_REF: not all forward unresolved forward operand references
34
35//===--------------------------------------------------------------------===//
36// Results
37
38// RUN: not mlir-opt %S/invalid-ir_section-results.mlirbc -allow-unregistered-dialect 2>&1 | FileCheck %s --check-prefix=OP_RESULTS
39// OP_RESULTS: value index range was outside of the expected range for the parent region, got [3, 6), but the maximum index was 2
40
41//===--------------------------------------------------------------------===//
42// Successors
43
44// RUN: not mlir-opt %S/invalid-ir_section-successors.mlirbc -allow-unregistered-dialect 2>&1 | FileCheck %s --check-prefix=OP_SUCCESSORS
45// OP_SUCCESSORS: invalid successor index: 3
46