xref: /llvm-project/mlir/test/Bytecode/versioning/versioned_op_with_native_properties.mlir (revision cf0e8dca8496660fc18a8bbbb4da765027f2080d)
1// This file contains test cases related to the dialect post-parsing upgrade
2// mechanism.
3// COM: those tests parse bytecode that was generated before test dialect
4//      adopted `usePropertiesFromAttributes`.
5
6//===--------------------------------------------------------------------===//
7// Test generic
8//===--------------------------------------------------------------------===//
9
10// COM: bytecode contains
11// COM: module {
12// COM:   version: 2.0
13// COM:   test.with_versioned_properties 1 | 2
14// COM: }
15// RUN: mlir-opt %S/versioned-op-with-native-prop-2.0.mlirbc 2>&1 | FileCheck %s --check-prefix=CHECK1
16// CHECK1: test.with_versioned_properties 1 | 2
17
18//===--------------------------------------------------------------------===//
19// Test upgrade
20//===--------------------------------------------------------------------===//
21
22// COM: bytecode contains
23// COM: module {
24// COM:   version: 1.12
25
26// COM: }
27// RUN: mlir-opt %S/versioned-op-with-native-prop-1.12.mlirbc 2>&1 | FileCheck %s --check-prefix=CHECK3
28// CHECK3: test.with_versioned_properties 1 | 0
29