diff options
author | Thomas Lively <tlively@google.com> | 2023-04-13 14:37:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 21:37:33 +0000 |
commit | 34d5e785650101c5ccec8e99c514ad1033ca3624 (patch) | |
tree | 45a3e7be4e5b69fdc6fc9f5fb2419b5f90506cfd /test/lit/passes/dae-gc.wast | |
parent | d2ee08a8b59e6612b5477d99dc684add5639a70b (diff) | |
download | binaryen-34d5e785650101c5ccec8e99c514ad1033ca3624.tar.gz binaryen-34d5e785650101c5ccec8e99c514ad1033ca3624.tar.bz2 binaryen-34d5e785650101c5ccec8e99c514ad1033ca3624.zip |
Remove --nominal from more tests (#5664)
These tests were easy to remove --nominal from because they already worked with
the standard type system as well.
Diffstat (limited to 'test/lit/passes/dae-gc.wast')
-rw-r--r-- | test/lit/passes/dae-gc.wast | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/test/lit/passes/dae-gc.wast b/test/lit/passes/dae-gc.wast index 2100baa4c..97216ae8f 100644 --- a/test/lit/passes/dae-gc.wast +++ b/test/lit/passes/dae-gc.wast @@ -1,18 +1,13 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. ;; RUN: foreach %s %t wasm-opt -all --dae -S -o - | filecheck %s -;; RUN: foreach %s %t wasm-opt -all --dae --nominal -S -o - | filecheck %s --check-prefix=NOMNL (module ;; CHECK: (type ${} (struct )) - ;; NOMNL: (type ${} (struct )) (type ${} (struct)) ;; CHECK: (func $foo (type $none_=>_none) ;; CHECK-NEXT: (call $bar) ;; CHECK-NEXT: ) - ;; NOMNL: (func $foo (type $none_=>_none) - ;; NOMNL-NEXT: (call $bar) - ;; NOMNL-NEXT: ) (func $foo (call $bar (i31.new @@ -33,19 +28,6 @@ ;; CHECK-NEXT: (unreachable) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (func $bar (type $none_=>_none) - ;; NOMNL-NEXT: (local $0 i31ref) - ;; NOMNL-NEXT: (drop - ;; NOMNL-NEXT: (local.tee $0 - ;; NOMNL-NEXT: (i31.new - ;; NOMNL-NEXT: (i32.const 2) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (local.tee $0 - ;; NOMNL-NEXT: (unreachable) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $bar (param $0 i31ref) (drop ;; after the parameter is removed, we create a nullable local to replace it, @@ -71,19 +53,12 @@ ;; CHECK-NEXT: (local $0 (ref ${})) ;; CHECK-NEXT: (nop) ;; CHECK-NEXT: ) - ;; NOMNL: (func $get-nonnull (type $none_=>_none) - ;; NOMNL-NEXT: (local $0 (ref ${})) - ;; NOMNL-NEXT: (nop) - ;; NOMNL-NEXT: ) (func $get-nonnull (param $0 (ref ${})) (nop) ) ;; CHECK: (func $send-nonnull (type $none_=>_none) ;; CHECK-NEXT: (call $get-nonnull) ;; CHECK-NEXT: ) - ;; NOMNL: (func $send-nonnull (type $none_=>_none) - ;; NOMNL-NEXT: (call $get-nonnull) - ;; NOMNL-NEXT: ) (func $send-nonnull (call $get-nonnull (struct.new ${}) @@ -107,20 +82,6 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (func $foo (type $ref|none_->_none|_=>_none) (param $0 (ref $none_=>_none)) - ;; NOMNL-NEXT: (local $1 (ref $none_=>_none)) - ;; NOMNL-NEXT: (local.set $1 - ;; NOMNL-NEXT: (ref.func $a) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (block - ;; NOMNL-NEXT: (drop - ;; NOMNL-NEXT: (local.get $1) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (drop - ;; NOMNL-NEXT: (local.get $0) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $foo (param $x (ref func)) (param $y (ref func)) ;; "Use" the params to avoid other optimizations kicking in. (drop (local.get $x)) @@ -135,14 +96,6 @@ ;; CHECK-NEXT: (ref.func $c) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (func $call-foo (type $none_=>_none) - ;; NOMNL-NEXT: (call $foo - ;; NOMNL-NEXT: (ref.func $b) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (call $foo - ;; NOMNL-NEXT: (ref.func $c) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $call-foo ;; Call $foo with a constant function in the first param, which we ;; can optimize, but different ones in the second. @@ -170,20 +123,6 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (func $bar (type $i31ref_=>_none) (param $0 i31ref) - ;; NOMNL-NEXT: (local $1 nullref) - ;; NOMNL-NEXT: (local.set $1 - ;; NOMNL-NEXT: (ref.null none) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (block - ;; NOMNL-NEXT: (drop - ;; NOMNL-NEXT: (local.get $1) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (drop - ;; NOMNL-NEXT: (local.get $0) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $bar (param $x (ref null any)) (param $y (ref null any)) ;; "Use" the params to avoid other optimizations kicking in. (drop (local.get $x)) @@ -200,16 +139,6 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (func $call-bar (type $none_=>_none) - ;; NOMNL-NEXT: (call $bar - ;; NOMNL-NEXT: (ref.null none) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (call $bar - ;; NOMNL-NEXT: (i31.new - ;; NOMNL-NEXT: (i32.const 0) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $call-bar ;; Call with nulls. Mixing nulls is fine as they all have the same type and ;; value. However, mixing a null with a reference stops us in the second @@ -228,23 +157,14 @@ ;; CHECK: (func $a (type $none_=>_none) ;; CHECK-NEXT: (nop) ;; CHECK-NEXT: ) - ;; NOMNL: (func $a (type $none_=>_none) - ;; NOMNL-NEXT: (nop) - ;; NOMNL-NEXT: ) (func $a) ;; CHECK: (func $b (type $none_=>_none) ;; CHECK-NEXT: (nop) ;; CHECK-NEXT: ) - ;; NOMNL: (func $b (type $none_=>_none) - ;; NOMNL-NEXT: (nop) - ;; NOMNL-NEXT: ) (func $b) ;; CHECK: (func $c (type $none_=>_none) ;; CHECK-NEXT: (nop) ;; CHECK-NEXT: ) - ;; NOMNL: (func $c (type $none_=>_none) - ;; NOMNL-NEXT: (nop) - ;; NOMNL-NEXT: ) (func $c) ) @@ -253,9 +173,6 @@ ;; CHECK: (func $0 (type $none_=>_none) ;; CHECK-NEXT: (call $1) ;; CHECK-NEXT: ) - ;; NOMNL: (func $0 (type $none_=>_none) - ;; NOMNL-NEXT: (call $1) - ;; NOMNL-NEXT: ) (func $0 (call $1 (string.const "310") @@ -275,19 +192,6 @@ ;; CHECK-NEXT: (nop) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; NOMNL: (func $1 (type $none_=>_none) - ;; NOMNL-NEXT: (local $0 (ref string)) - ;; NOMNL-NEXT: (local $1 (ref string)) - ;; NOMNL-NEXT: (local.set $0 - ;; NOMNL-NEXT: (string.const "929") - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (block - ;; NOMNL-NEXT: (local.set $1 - ;; NOMNL-NEXT: (string.const "310") - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (nop) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: ) (func $1 (param $0 (ref string)) (param $1 (ref string)) ;; The parameters here will be removed, and the constant values placed in the ;; function. |