diff options
Diffstat (limited to 'test/lit/passes/inlining_all-features.wast')
-rw-r--r-- | test/lit/passes/inlining_all-features.wast | 64 |
1 files changed, 3 insertions, 61 deletions
diff --git a/test/lit/passes/inlining_all-features.wast b/test/lit/passes/inlining_all-features.wast index eee8fbdc9..3cd7b0134 100644 --- a/test/lit/passes/inlining_all-features.wast +++ b/test/lit/passes/inlining_all-features.wast @@ -1,7 +1,6 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. ;; RUN: foreach %s %t wasm-opt --inlining --all-features -S -o - | filecheck %s -;; RUN: foreach %s %t wasm-opt --inlining --all-features --nominal -S -o - | filecheck %s --check-prefix=NOMNL (module ;; CHECK: (type $none_=>_none (func)) @@ -11,13 +10,6 @@ ;; CHECK: (elem declare func $foo) ;; CHECK: (export "ref_func_test" (func $ref_func_test)) - ;; NOMNL: (type $none_=>_none (func)) - - ;; NOMNL: (type $none_=>_funcref (func (result funcref))) - - ;; NOMNL: (elem declare func $foo) - - ;; NOMNL: (export "ref_func_test" (func $ref_func_test)) (export "ref_func_test" (func $ref_func_test)) ;; $foo should not be removed after being inlined, because there is 'ref.func' @@ -25,9 +17,6 @@ ;; CHECK: (func $foo (type $none_=>_none) ;; CHECK-NEXT: (nop) ;; CHECK-NEXT: ) - ;; NOMNL: (func $foo (type $none_=>_none) - ;; NOMNL-NEXT: (nop) - ;; NOMNL-NEXT: ) (func $foo) ;; CHECK: (func $ref_func_test (type $none_=>_funcref) (result funcref) @@ -38,14 +27,6 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (ref.func $foo) ;; CHECK-NEXT: ) - ;; NOMNL: (func $ref_func_test (type $none_=>_funcref) (result funcref) - ;; NOMNL-NEXT: (block - ;; NOMNL-NEXT: (block $__inlined_func$foo - ;; NOMNL-NEXT: (nop) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (ref.func $foo) - ;; NOMNL-NEXT: ) (func $ref_func_test (result funcref) (call $foo) (ref.func $foo) @@ -55,20 +36,15 @@ (module ;; a function reference in a global's init should be noticed, and prevent us ;; from removing an inlined function + ;; CHECK: (type $none_=>_i32 (func (result i32))) ;; CHECK: (global $global$0 (mut funcref) (ref.func $0)) - ;; NOMNL: (type $none_=>_i32 (func (result i32))) - - ;; NOMNL: (global $global$0 (mut funcref) (ref.func $0)) (global $global$0 (mut funcref) (ref.func $0)) ;; CHECK: (func $0 (type $none_=>_i32) (result i32) ;; CHECK-NEXT: (i32.const 1337) ;; CHECK-NEXT: ) - ;; NOMNL: (func $0 (type $none_=>_i32) (result i32) - ;; NOMNL-NEXT: (i32.const 1337) - ;; NOMNL-NEXT: ) (func $0 (result i32) (i32.const 1337) ) @@ -78,11 +54,6 @@ ;; CHECK-NEXT: (i32.const 1337) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (func $1 (type $none_=>_i32) (result i32) - ;; NOMNL-NEXT: (block $__inlined_func$0 (result i32) - ;; NOMNL-NEXT: (i32.const 1337) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $1 (result i32) (call $0) ) @@ -91,20 +62,15 @@ (module ;; a function reference in the start should be noticed, and prevent us ;; from removing an inlined function + ;; CHECK: (type $none_=>_none (func)) ;; CHECK: (start $0) - ;; NOMNL: (type $none_=>_none (func)) - - ;; NOMNL: (start $0) (start $0) ;; CHECK: (func $0 (type $none_=>_none) ;; CHECK-NEXT: (nop) ;; CHECK-NEXT: ) - ;; NOMNL: (func $0 (type $none_=>_none) - ;; NOMNL-NEXT: (nop) - ;; NOMNL-NEXT: ) (func $0 (nop) ) @@ -114,11 +80,6 @@ ;; CHECK-NEXT: (nop) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (func $1 (type $none_=>_none) - ;; NOMNL-NEXT: (block $__inlined_func$0 - ;; NOMNL-NEXT: (nop) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $1 (call $0) ) @@ -127,11 +88,9 @@ ;; inline a return_call_ref (module ;; CHECK: (type $none_=>_none (func)) - ;; NOMNL: (type $none_=>_none (func)) (type $none_=>_none (func)) ;; CHECK: (export "func_36_invoker" (func $1)) - ;; NOMNL: (export "func_36_invoker" (func $1)) (export "func_36_invoker" (func $1)) (func $0 @@ -144,11 +103,6 @@ ;; CHECK-NEXT: (unreachable) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (func $1 (type $none_=>_none) - ;; NOMNL-NEXT: (block $__inlined_func$0 - ;; NOMNL-NEXT: (unreachable) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $1 (call $0) ) @@ -160,6 +114,7 @@ (func $0 (param $non-null (ref func)) (result (ref func)) (local.get $non-null) ) + ;; CHECK: (type $none_=>_ref|func| (func (result (ref func)))) ;; CHECK: (elem declare func $1) @@ -173,19 +128,6 @@ ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (type $none_=>_ref|func| (func (result (ref func)))) - - ;; NOMNL: (elem declare func $1) - - ;; NOMNL: (func $1 (type $none_=>_ref|func|) (result (ref func)) - ;; NOMNL-NEXT: (local $0 (ref func)) - ;; NOMNL-NEXT: (block $__inlined_func$0 (result (ref func)) - ;; NOMNL-NEXT: (local.set $0 - ;; NOMNL-NEXT: (ref.func $1) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (local.get $0) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $1 (result (ref func)) (call $0 (ref.func $1) |