39 lines · plain
1// This file contains test cases related to the dialect post-parsing upgrade2// mechanism.3 4//===--------------------------------------------------------------------===//5// Test generic6//===--------------------------------------------------------------------===//7 8// COM: bytecode contains9// COM: module {10// COM: version: 2.011// COM: "test.versionedA"() <{dims = 123 : i64, modifier = false}> : () -> ()12// COM: }13// RUN: mlir-opt %S/versioned-op-with-prop-2.0.mlirbc 2>&1 | FileCheck %s --check-prefix=CHECK114// CHECK1: "test.versionedA"() <{dims = 123 : i64, modifier = false}> : () -> ()15 16//===--------------------------------------------------------------------===//17// Test upgrade18//===--------------------------------------------------------------------===//19 20// COM: bytecode contains21// COM: module {22// COM: version: 1.1223// COM: "test.versionedA"() <{dimensions = 123 : i64}> : () -> ()24// COM: }25// RUN: mlir-opt %S/versioned-op-with-prop-1.12.mlirbc 2>&1 | FileCheck %s --check-prefix=CHECK326// CHECK3: "test.versionedA"() <{dims = 123 : i64, modifier = false}> : () -> ()27 28//===--------------------------------------------------------------------===//29// Test forbidden downgrade30//===--------------------------------------------------------------------===//31 32// COM: bytecode contains33// COM: module {34// COM: version: 2.235// COM: "test.versionedA"() <{dims = 123 : i64, modifier = false}> : () -> ()36// COM: }37// RUN: not mlir-opt %S/versioned-op-2.2.mlirbc 2>&1 | FileCheck %s --check-prefix=ERR_NEW_VERSION38// ERR_NEW_VERSION: current test dialect version is 2.0, can't parse version: 2.239