[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / mlir / test / Bytecode / general.mlir
blob957c35dee8002ec52c1a8ee7186f780663e5f914
1 // RUN: mlir-opt -allow-unregistered-dialect -emit-bytecode %s | mlir-opt -allow-unregistered-dialect | FileCheck %s
3 // Bytecode currently does not support big-endian platforms
4 // UNSUPPORTED: target=s390x-{{.*}}
6 // CHECK-LABEL: "bytecode.test1"
7 // CHECK-NEXT:    "bytecode.empty"() : () -> ()
8 // CHECK-NEXT:    "bytecode.attributes"() {attra = 10 : i64, attrb = #bytecode.attr} : () -> ()
9 // CHECK-NEXT:    test.graph_region {
10 // CHECK-NEXT:      "bytecode.operands"(%[[RESULTS:.*]]#0, %[[RESULTS]]#1, %[[RESULTS]]#2) : (i32, i64, i32) -> ()
11 // CHECK-NEXT:      %[[RESULTS]]:3 = "bytecode.results"() : () -> (i32, i64, i32)
12 // CHECK-NEXT:    }
13 // CHECK-NEXT:    "bytecode.branch"()[^[[BLOCK:.*]]] : () -> ()
14 // CHECK-NEXT:  ^[[BLOCK]](%[[ARG0:.*]]: i32, %[[ARG1:.*]]: !bytecode.int, %[[ARG2:.*]]: !pdl.operation):
15 // CHECK-NEXT:    "bytecode.regions"() ({
16 // CHECK-NEXT:      "bytecode.operands"(%[[ARG0]], %[[ARG1]], %[[ARG2]]) : (i32, !bytecode.int, !pdl.operation) -> ()
17 // CHECK-NEXT:      "bytecode.return"() : () -> ()
18 // CHECK-NEXT:    }) : () -> ()
19 // CHECK-NEXT:    "bytecode.return"() : () -> ()
20 // CHECK-NEXT:  }) : () -> ()
22 "bytecode.test1"() ({
23   "bytecode.empty"() : () -> ()
24   "bytecode.attributes"() {attra = 10, attrb = #bytecode.attr} : () -> ()
25   test.graph_region {
26     "bytecode.operands"(%results#0, %results#1, %results#2) : (i32, i64, i32) -> ()
27     %results:3 = "bytecode.results"() : () -> (i32, i64, i32)
28   }
29   "bytecode.branch"()[^secondBlock] : () -> ()
31 ^secondBlock(%arg1: i32, %arg2: !bytecode.int, %arg3: !pdl.operation):
32   "bytecode.regions"() ({
33     "bytecode.operands"(%arg1, %arg2, %arg3) : (i32, !bytecode.int, !pdl.operation) -> ()
34     "bytecode.return"() : () -> ()
35   }) : () -> ()
36   "bytecode.return"() : () -> ()
37 }) : () -> ()