2018-06-23 01:39:19 +08:00
|
|
|
; TODO(andydavis) Resolve relative path issue w.r.t invoking mlir-opt in RUN
|
|
|
|
; statements (perhaps through using lit config substitutions).
|
|
|
|
;
|
|
|
|
; RUN: %S/../../mlir-opt %s -o - | FileCheck %s
|
|
|
|
|
|
|
|
|
2018-06-23 13:03:48 +08:00
|
|
|
; CHECK: extfunc @foo(i32, i64) -> f32
|
2018-06-23 06:52:02 +08:00
|
|
|
extfunc @foo(i32, i64) -> f32
|
2018-06-23 01:39:19 +08:00
|
|
|
|
|
|
|
; CHECK: extfunc @bar()
|
2018-06-23 06:52:02 +08:00
|
|
|
extfunc @bar() -> ()
|
2018-06-23 01:39:19 +08:00
|
|
|
|
2018-06-23 13:03:48 +08:00
|
|
|
; CHECK: extfunc @baz() -> (i1, int, f32)
|
2018-06-23 06:52:02 +08:00
|
|
|
extfunc @baz() -> (i1, int, f32)
|
2018-06-23 01:39:19 +08:00
|
|
|
|
2018-06-23 06:52:02 +08:00
|
|
|
; CHECK: extfunc @missingReturn()
|
|
|
|
extfunc @missingReturn()
|
|
|
|
|
|
|
|
|
2018-06-23 13:03:48 +08:00
|
|
|
; CHECK: extfunc @vectors(vector<1xf32>, vector<2x4xf32>)
|
2018-06-23 06:52:02 +08:00
|
|
|
extfunc @vectors(vector<1 x f32>, vector<2x4xf32>)
|
|
|
|
|
2018-06-24 09:09:09 +08:00
|
|
|
; CHECK: extfunc @tensors(tensor<??f32>, tensor<??vector<2x4xf32>>, tensor<1x?x4x?x?xint>, tensor<i8>)
|
2018-06-23 06:52:02 +08:00
|
|
|
extfunc @tensors(tensor<?? f32>, tensor<?? vector<2x4xf32>>,
|
|
|
|
tensor<1x?x4x?x?xint>, tensor<i8>)
|
|
|
|
|
2018-06-23 13:03:48 +08:00
|
|
|
; CHECK: extfunc @memrefs(i1, i1)
|
2018-06-23 06:52:02 +08:00
|
|
|
extfunc @memrefs(memref<1x?x4x?x?xint>, memref<i8>)
|
2018-06-23 13:03:48 +08:00
|
|
|
|
|
|
|
; CHECK: extfunc @functions((i1, i1) -> (), () -> ())
|
|
|
|
extfunc @functions((memref<1x?x4x?x?xint>, memref<i8>) -> (), ()->())
|
2018-06-24 07:03:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
; CHECK-LABEL: cfgfunc @simpleCFG() {
|
|
|
|
cfgfunc @simpleCFG() {
|
|
|
|
bb42: ; CHECK: bb0:
|
|
|
|
return ; CHECK: return
|
|
|
|
} ; CHECK: }
|
|
|
|
|
|
|
|
; CHECK-LABEL: cfgfunc @multiblock() -> i32 {
|
|
|
|
cfgfunc @multiblock() -> i32 {
|
|
|
|
bb0: ; CHECK: bb0:
|
2018-06-25 02:18:29 +08:00
|
|
|
return ; CHECK: return
|
|
|
|
bb1: ; CHECK: bb1:
|
|
|
|
br bb4 ; CHECK: br bb3
|
|
|
|
bb2: ; CHECK: bb2:
|
|
|
|
br bb2 ; CHECK: br bb2
|
|
|
|
bb4: ; CHECK: bb3:
|
|
|
|
return ; CHECK: return
|
2018-06-24 07:03:42 +08:00
|
|
|
} ; CHECK: }
|
2018-06-29 08:02:32 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: mlfunc @simpleMLF() {
|
|
|
|
mlfunc @simpleMLF() {
|
|
|
|
return ; CHECK: return
|
|
|
|
} ; CHECK: }
|
|
|
|
|