xref: /llvm-project/mlir/test/Bytecode/bytecode_callback_full_override.mlir (revision 7ad9e9dcf518431a8ecedcc06b09df6c799658ef)
1// RUN: not mlir-opt %s -split-input-file --test-bytecode-roundtrip="test-kind=5" 2>&1 | FileCheck %s
2
3// CHECK-NOT: failed to read bytecode
4func.func @base_test(%arg0 : i32) -> f32 {
5  %0 = "test.addi"(%arg0, %arg0) : (i32, i32) -> i32
6  %1 = "test.cast"(%0) : (i32) -> f32
7  return %1 : f32
8}
9
10// -----
11
12// CHECK-LABEL: error: unknown attribute code: 99
13// CHECK: failed to read bytecode
14func.func @base_test(%arg0 : !test.i32) -> f32 {
15  %0 = "test.addi"(%arg0, %arg0) : (!test.i32, !test.i32) -> !test.i32
16  %1 = "test.cast"(%0) : (!test.i32) -> f32
17  return %1 : f32
18}
19