summaryrefslogtreecommitdiff
path: root/test/lit/passes
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-11-14 21:22:34 -0500
committerGitHub <noreply@github.com>2024-11-14 18:22:34 -0800
commit49c45ac1675d787e7151f9beafcae479936aa9f3 (patch)
tree1abb2ebffdb57d43e92615f4a166dc61532dbeef /test/lit/passes
parent6efd41779272d2ac7eb75705c21c9f437a1409c9 (diff)
downloadbinaryen-49c45ac1675d787e7151f9beafcae479936aa9f3.tar.gz
binaryen-49c45ac1675d787e7151f9beafcae479936aa9f3.tar.bz2
binaryen-49c45ac1675d787e7151f9beafcae479936aa9f3.zip
Use empty blocks instead of nops for empty scopes in IRBuilder (#7080)
When IRBuilder builds an empty non-block scope such as a function body, an if arm, a try block, etc, it needs to produce some expression to represent the empty contents. Previously it produced a nop, but change it to produce an empty block instead. The binary writer and printer have special logic to elide empty blocks, so this produces smaller output. Update J2CLOpts to recognize functions containing empty blocks as trivial to avoid regressing one of its tests.
Diffstat (limited to 'test/lit/passes')
-rw-r--r--test/lit/passes/abstract-type-refining.wast8
-rw-r--r--test/lit/passes/asyncify_enable-multivalue.wast2
-rw-r--r--test/lit/passes/asyncify_optimize-level=1.wast1
-rw-r--r--test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo.wast1
-rw-r--r--test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast1
-rw-r--r--test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-propagate-addlist.wast1
-rw-r--r--test/lit/passes/asyncify_pass-arg=asyncify-imports@env.import,env.import2.wast2
-rw-r--r--test/lit/passes/coalesce-locals-eh-legacy.wast1
-rw-r--r--test/lit/passes/code-folding-eh-legacy.wast2
-rw-r--r--test/lit/passes/code-folding-eh.wast1
-rw-r--r--test/lit/passes/code-pushing-eh-legacy.wast4
-rw-r--r--test/lit/passes/code-pushing-eh.wast1
-rw-r--r--test/lit/passes/dae-gc-refine-params.wast1
-rw-r--r--test/lit/passes/dae-gc.wast3
-rw-r--r--test/lit/passes/dae_all-features.wast8
-rw-r--r--test/lit/passes/dae_tnh.wast2
-rw-r--r--test/lit/passes/dce-eh-legacy.wast4
-rw-r--r--test/lit/passes/dce-eh.wast1
-rw-r--r--test/lit/passes/denan.wast5
-rw-r--r--test/lit/passes/flatten-eh-legacy.wast1
-rw-r--r--test/lit/passes/flatten_i64-to-i32-lowering.wast2
-rw-r--r--test/lit/passes/flatten_simplify-locals-nonesting_souperify-single-use_enable-threads.wast1
-rw-r--r--test/lit/passes/flatten_simplify-locals-nonesting_souperify_enable-threads.wast2
-rw-r--r--test/lit/passes/fpcast-emu.wast4
-rw-r--r--test/lit/passes/global-refining.wast4
-rw-r--r--test/lit/passes/gto-removals.wast8
-rw-r--r--test/lit/passes/gufa-refs.wast5
-rw-r--r--test/lit/passes/heap2local.wast1
-rw-r--r--test/lit/passes/inlining-eh-legacy.wast11
-rw-r--r--test/lit/passes/inlining-gc.wast6
-rw-r--r--test/lit/passes/inlining_all-features.wast7
-rw-r--r--test/lit/passes/inlining_splitting.wast1
-rw-r--r--test/lit/passes/instrument-locals-eh-legacy.wast1
-rw-r--r--test/lit/passes/j2cl-merge-itables.wast2
-rw-r--r--test/lit/passes/j2cl.wast5
-rw-r--r--test/lit/passes/legalize-js-interface-exported-helpers.wast1
-rw-r--r--test/lit/passes/local-cse_all-features.wast1
-rw-r--r--test/lit/passes/monomorphize-context.wast25
-rw-r--r--test/lit/passes/monomorphize-limits.wast8
-rw-r--r--test/lit/passes/name-types.wast1
-rw-r--r--test/lit/passes/once-reduction.wast3
-rw-r--r--test/lit/passes/optimize-casts-noeh.wast1
-rw-r--r--test/lit/passes/optimize-casts.wast1
-rw-r--r--test/lit/passes/optimize-instructions-call_ref-roundtrip.wast3
-rw-r--r--test/lit/passes/optimize-instructions-call_ref.wast1
-rw-r--r--test/lit/passes/optimize-instructions-eh-legacy.wast3
-rw-r--r--test/lit/passes/optimize-instructions-gc-iit.wast2
-rw-r--r--test/lit/passes/optimize-instructions-gc.wast1
-rw-r--r--test/lit/passes/optimize-instructions-iit-eh-legacy.wast1
-rw-r--r--test/lit/passes/optimize-instructions-mvp.wast1
-rw-r--r--test/lit/passes/remove-unused-brs-eh.wast2
-rw-r--r--test/lit/passes/remove-unused-brs.wast1
-rw-r--r--test/lit/passes/remove-unused-brs_all-features.wast1
-rw-r--r--test/lit/passes/remove-unused-module-elements-refs.wast52
-rw-r--r--test/lit/passes/remove-unused-module-elements_all-features.wast4
-rw-r--r--test/lit/passes/remove-unused-module-elements_tnh.wast6
-rw-r--r--test/lit/passes/remove-unused-names-eh-legacy.wast1
-rw-r--r--test/lit/passes/rse-eh-legacy.wast12
-rw-r--r--test/lit/passes/rse-eh.wast2
-rw-r--r--test/lit/passes/rse-gc.wast1
-rw-r--r--test/lit/passes/signature-pruning.wast16
-rw-r--r--test/lit/passes/signature-refining.wast18
-rw-r--r--test/lit/passes/simplify-locals-eh-legacy.wast3
-rw-r--r--test/lit/passes/simplify-locals-gc.wast3
-rw-r--r--test/lit/passes/simplify-locals-global.wast1
-rw-r--r--test/lit/passes/ssa.wast1
-rw-r--r--test/lit/passes/stack-ir-roundtrip-eh-legacy.wast2
-rw-r--r--test/lit/passes/string-lowering_types.wast1
-rw-r--r--test/lit/passes/translate-to-exnref.wast15
-rw-r--r--test/lit/passes/type-finalizing.wast2
-rw-r--r--test/lit/passes/type-generalizing.wast1
-rw-r--r--test/lit/passes/type-merging-shared.wast3
-rw-r--r--test/lit/passes/type-merging.wast17
-rw-r--r--test/lit/passes/type-refining.wast1
74 files changed, 44 insertions, 285 deletions
diff --git a/test/lit/passes/abstract-type-refining.wast b/test/lit/passes/abstract-type-refining.wast
index e887894ea..5f6010ca0 100644
--- a/test/lit/passes/abstract-type-refining.wast
+++ b/test/lit/passes/abstract-type-refining.wast
@@ -242,7 +242,6 @@
;; YESTNH-NEXT: (local $C (ref $C))
;; YESTNH-NEXT: (local $D (ref $E))
;; YESTNH-NEXT: (local $E (ref $E))
- ;; YESTNH-NEXT: (nop)
;; YESTNH-NEXT: )
;; NO_TNH: (func $locals (type $6)
;; NO_TNH-NEXT: (local $A (ref $A))
@@ -250,7 +249,6 @@
;; NO_TNH-NEXT: (local $C (ref $C))
;; NO_TNH-NEXT: (local $D (ref $D))
;; NO_TNH-NEXT: (local $E (ref $E))
- ;; NO_TNH-NEXT: (nop)
;; NO_TNH-NEXT: )
(func $locals
;; Local variable types are also updated.
@@ -799,14 +797,12 @@
;; YESTNH-NEXT: (local $B (ref none))
;; YESTNH-NEXT: (local $C1 (ref none))
;; YESTNH-NEXT: (local $C2 nullref)
- ;; YESTNH-NEXT: (nop)
;; YESTNH-NEXT: )
;; NO_TNH: (func $locals (type $1)
;; NO_TNH-NEXT: (local $A (ref none))
;; NO_TNH-NEXT: (local $B (ref none))
;; NO_TNH-NEXT: (local $C1 (ref none))
;; NO_TNH-NEXT: (local $C2 nullref)
- ;; NO_TNH-NEXT: (nop)
;; NO_TNH-NEXT: )
(func $locals
;; All these locals can become nullable or even non-nullable null types.
@@ -1002,21 +998,17 @@
;; YESTNH: (type $3 (func (param funcref)))
;; YESTNH: (func $A (type $A)
- ;; YESTNH-NEXT: (nop)
;; YESTNH-NEXT: )
;; NO_TNH: (type $3 (func (param funcref)))
;; NO_TNH: (func $A (type $A)
- ;; NO_TNH-NEXT: (nop)
;; NO_TNH-NEXT: )
(func $A (type $A)
)
;; YESTNH: (func $C (type $A)
- ;; YESTNH-NEXT: (nop)
;; YESTNH-NEXT: )
;; NO_TNH: (func $C (type $A)
- ;; NO_TNH-NEXT: (nop)
;; NO_TNH-NEXT: )
(func $C (type $A)
)
diff --git a/test/lit/passes/asyncify_enable-multivalue.wast b/test/lit/passes/asyncify_enable-multivalue.wast
index f29edd4a5..86a8bc47e 100644
--- a/test/lit/passes/asyncify_enable-multivalue.wast
+++ b/test/lit/passes/asyncify_enable-multivalue.wast
@@ -193,7 +193,6 @@
(call $stuff) ;; do some more work
)
;; CHECK: (func $stuff
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $stuff)
;; the first event called from the main event loop: just call into $work
@@ -2484,7 +2483,6 @@
(call $import)
)
;; CHECK: (func $boring
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $boring)
;; CHECK: (func $calls-mix-deep
diff --git a/test/lit/passes/asyncify_optimize-level=1.wast b/test/lit/passes/asyncify_optimize-level=1.wast
index d7627f407..4839b08bb 100644
--- a/test/lit/passes/asyncify_optimize-level=1.wast
+++ b/test/lit/passes/asyncify_optimize-level=1.wast
@@ -1425,7 +1425,6 @@
(call $import)
)
;; CHECK: (func $boring
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $boring)
;; CHECK: (func $calls-mix-deep
diff --git a/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo.wast b/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo.wast
index 92dbe2bb2..2803d243d 100644
--- a/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo.wast
+++ b/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo.wast
@@ -114,7 +114,6 @@
(call $nothing)
)
;; CHECK: (func $nothing
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $nothing
)
diff --git a/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast b/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast
index 81107cb16..5f4fb89de 100644
--- a/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast
+++ b/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-ignore-indirect.wast
@@ -155,7 +155,6 @@
(call_indirect (type $t) (i32.const 0))
)
;; CHECK: (func $nothing
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $nothing
)
diff --git a/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-propagate-addlist.wast b/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-propagate-addlist.wast
index b0b758b49..37075e800 100644
--- a/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-propagate-addlist.wast
+++ b/test/lit/passes/asyncify_pass-arg=asyncify-addlist@foo_pass-arg=asyncify-propagate-addlist.wast
@@ -113,7 +113,6 @@
(call $nothing)
)
;; CHECK: (func $nothing
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $nothing
)
diff --git a/test/lit/passes/asyncify_pass-arg=asyncify-imports@env.import,env.import2.wast b/test/lit/passes/asyncify_pass-arg=asyncify-imports@env.import,env.import2.wast
index 801ab5eb9..36e1aa68c 100644
--- a/test/lit/passes/asyncify_pass-arg=asyncify-imports@env.import,env.import2.wast
+++ b/test/lit/passes/asyncify_pass-arg=asyncify-imports@env.import,env.import2.wast
@@ -193,7 +193,6 @@
(call $stuff) ;; do some more work
)
;; CHECK: (func $stuff
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $stuff)
;; the first event called from the main event loop: just call into $work
@@ -1610,7 +1609,6 @@
(call $import)
)
;; CHECK: (func $boring
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $boring)
;; CHECK: (func $calls-mix-deep
diff --git a/test/lit/passes/coalesce-locals-eh-legacy.wast b/test/lit/passes/coalesce-locals-eh-legacy.wast
index 9091fdcb9..b5b41b661 100644
--- a/test/lit/passes/coalesce-locals-eh-legacy.wast
+++ b/test/lit/passes/coalesce-locals-eh-legacy.wast
@@ -50,7 +50,6 @@
;; CHECK-NEXT: (local $0 anyref)
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $any
;; CHECK-NEXT: (drop
diff --git a/test/lit/passes/code-folding-eh-legacy.wast b/test/lit/passes/code-folding-eh-legacy.wast
index 852ec126a..81180d044 100644
--- a/test/lit/passes/code-folding-eh-legacy.wast
+++ b/test/lit/passes/code-folding-eh-legacy.wast
@@ -12,7 +12,6 @@
;; CHECK-NEXT: (do
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $e-i32
;; CHECK-NEXT: (drop
@@ -112,7 +111,6 @@
;; CHECK: (func $foo (type $1)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
diff --git a/test/lit/passes/code-folding-eh.wast b/test/lit/passes/code-folding-eh.wast
index 5a7cd68c7..94eb0b38d 100644
--- a/test/lit/passes/code-folding-eh.wast
+++ b/test/lit/passes/code-folding-eh.wast
@@ -53,7 +53,6 @@
;; CHECK: (func $foo (type $1)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
diff --git a/test/lit/passes/code-pushing-eh-legacy.wast b/test/lit/passes/code-pushing-eh-legacy.wast
index 9511d244a..06b2e3e71 100644
--- a/test/lit/passes/code-pushing-eh-legacy.wast
+++ b/test/lit/passes/code-pushing-eh-legacy.wast
@@ -17,7 +17,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
@@ -53,7 +52,6 @@
)
;; CHECK: (func $foo (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
@@ -166,7 +164,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
@@ -224,7 +221,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
diff --git a/test/lit/passes/code-pushing-eh.wast b/test/lit/passes/code-pushing-eh.wast
index ee2798c46..3c6d005b1 100644
--- a/test/lit/passes/code-pushing-eh.wast
+++ b/test/lit/passes/code-pushing-eh.wast
@@ -118,7 +118,6 @@
)
;; CHECK: (func $foo (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
diff --git a/test/lit/passes/dae-gc-refine-params.wast b/test/lit/passes/dae-gc-refine-params.wast
index f9e9c4651..8cefbe881 100644
--- a/test/lit/passes/dae-gc-refine-params.wast
+++ b/test/lit/passes/dae-gc-refine-params.wast
@@ -316,7 +316,6 @@
;; CHECK: (func $unused-and-refinable (type $2)
;; CHECK-NEXT: (local $0 structref)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $unused-and-refinable (param $0 structref)
;; This function does not use $0. It is called with $"{}", so it is also
diff --git a/test/lit/passes/dae-gc.wast b/test/lit/passes/dae-gc.wast
index 987823020..1f39567d1 100644
--- a/test/lit/passes/dae-gc.wast
+++ b/test/lit/passes/dae-gc.wast
@@ -155,15 +155,12 @@
;; Helper functions so we have something to take the reference of.
;; CHECK: (func $a (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $a)
;; CHECK: (func $b (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $b)
;; CHECK: (func $c (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $c)
)
diff --git a/test/lit/passes/dae_all-features.wast b/test/lit/passes/dae_all-features.wast
index da9558dd8..145ae1ff0 100644
--- a/test/lit/passes/dae_all-features.wast
+++ b/test/lit/passes/dae_all-features.wast
@@ -33,7 +33,8 @@
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $a (param $x i32))
;; CHECK: (func $b (type $0)
@@ -114,7 +115,8 @@
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (i32.const 4)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $a4 (param $x i32)
;; This function is called with one constant and one unreachable. We can
@@ -219,7 +221,6 @@
(call $a7 (i32.const 1) (call $get-f64))
)
;; CHECK: (func $a8 (type $1) (param $x i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $a8 (param $x i32)) ;; exported, do not optimize
;; CHECK: (func $b8 (type $0)
@@ -231,7 +232,6 @@
(call $a8 (i32.const 1))
)
;; CHECK: (func $a9 (type $1) (param $x i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $a9 (param $x i32)) ;; tabled, do not optimize
;; CHECK: (func $b9 (type $0)
diff --git a/test/lit/passes/dae_tnh.wast b/test/lit/passes/dae_tnh.wast
index 2bba6570b..6e78283fd 100644
--- a/test/lit/passes/dae_tnh.wast
+++ b/test/lit/passes/dae_tnh.wast
@@ -57,7 +57,6 @@
)
;; CHECK: (func $target (type $1) (param $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $target (param i32)
)
@@ -105,7 +104,6 @@
)
;; CHECK: (func $target (type $1) (param $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $target (param i32)
)
diff --git a/test/lit/passes/dce-eh-legacy.wast b/test/lit/passes/dce-eh-legacy.wast
index 107c35609..31ba4fac2 100644
--- a/test/lit/passes/dce-eh-legacy.wast
+++ b/test/lit/passes/dce-eh-legacy.wast
@@ -25,7 +25,6 @@
(tag $e-eqref (param (ref null eq)))
;; CHECK: (func $foo (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
@@ -35,7 +34,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (call $foo)
@@ -53,7 +51,6 @@
;; CHECK: (func $catch_unreachable (type $0)
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
;; CHECK-NEXT: (unreachable)
@@ -96,7 +93,6 @@
;; CHECK: (func $rethrow (type $0)
;; CHECK-NEXT: (try $l0
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $e
;; CHECK-NEXT: (drop
diff --git a/test/lit/passes/dce-eh.wast b/test/lit/passes/dce-eh.wast
index 413a278d0..b2742913b 100644
--- a/test/lit/passes/dce-eh.wast
+++ b/test/lit/passes/dce-eh.wast
@@ -11,7 +11,6 @@
(tag $e-i32 (param i32))
;; CHECK: (func $foo (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
diff --git a/test/lit/passes/denan.wast b/test/lit/passes/denan.wast
index bc42ab04e..9f167b15d 100644
--- a/test/lit/passes/denan.wast
+++ b/test/lit/passes/denan.wast
@@ -59,7 +59,8 @@
;; CHECK-NEXT: (local.get $w)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $various (param $x i32) (param $y f32) (param $z i64) (param $w f64)
)
@@ -251,11 +252,9 @@
;; CHECK: (type $2 (func (param f64) (result f64)))
;; CHECK: (func $deNan32
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $deNan32)
;; CHECK: (func $deNan64
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $deNan64)
;; CHECK: (func $foo32 (param $x f32) (result f32)
diff --git a/test/lit/passes/flatten-eh-legacy.wast b/test/lit/passes/flatten-eh-legacy.wast
index 56057b779..34b5cf08b 100644
--- a/test/lit/passes/flatten-eh-legacy.wast
+++ b/test/lit/passes/flatten-eh-legacy.wast
@@ -61,7 +61,6 @@
;; CHECK-NEXT: (block $l0
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $e-i32
;; CHECK-NEXT: (local.set $1
diff --git a/test/lit/passes/flatten_i64-to-i32-lowering.wast b/test/lit/passes/flatten_i64-to-i32-lowering.wast
index 5a185cc0a..e5e556c79 100644
--- a/test/lit/passes/flatten_i64-to-i32-lowering.wast
+++ b/test/lit/passes/flatten_i64-to-i32-lowering.wast
@@ -480,7 +480,6 @@
;; CHECK: (export "unreach" (func $unreach))
;; CHECK: (func $call (type $1) (param $0 i32) (param $0$hi i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $call (param i64))
;; CHECK: (func $exp (type $0)
@@ -586,7 +585,6 @@
;; CHECK: (export "exp" (func $exp))
;; CHECK: (func $call (type $0) (param $0 i32) (param $0$hi i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $call (param i64))
;; CHECK: (func $exp (type $1)
diff --git a/test/lit/passes/flatten_simplify-locals-nonesting_souperify-single-use_enable-threads.wast b/test/lit/passes/flatten_simplify-locals-nonesting_souperify-single-use_enable-threads.wast
index 76b4e6e51..f71970035 100644
--- a/test/lit/passes/flatten_simplify-locals-nonesting_souperify-single-use_enable-threads.wast
+++ b/test/lit/passes/flatten_simplify-locals-nonesting_souperify-single-use_enable-threads.wast
@@ -2477,7 +2477,6 @@
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: (loop $loopy
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: (nop)
diff --git a/test/lit/passes/flatten_simplify-locals-nonesting_souperify_enable-threads.wast b/test/lit/passes/flatten_simplify-locals-nonesting_souperify_enable-threads.wast
index 5c11e34e3..d57df6579 100644
--- a/test/lit/passes/flatten_simplify-locals-nonesting_souperify_enable-threads.wast
+++ b/test/lit/passes/flatten_simplify-locals-nonesting_souperify_enable-threads.wast
@@ -318,7 +318,6 @@
)
)
;; CHECK: (func $send-i32 (param $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $send-i32 (param i32))
;; flipping of greater than/or equals ops, which are not in Souper IR
@@ -2545,7 +2544,6 @@
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: (loop $loopy
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: (nop)
diff --git a/test/lit/passes/fpcast-emu.wast b/test/lit/passes/fpcast-emu.wast
index 8ded82647..9da081c4a 100644
--- a/test/lit/passes/fpcast-emu.wast
+++ b/test/lit/passes/fpcast-emu.wast
@@ -370,19 +370,15 @@
;; CHECK: (export "dynCall_vd" (func $min_vd))
(export "dynCall_vd" (func $min_vd))
;; CHECK: (func $a (param $0 f32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $a (param $0 f32))
;; CHECK: (func $b (param $0 f64)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $b (param $0 f64))
;; CHECK: (func $dynCall_vf (param $0 f32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $dynCall_vf (param $0 f32))
;; CHECK: (func $min_vd (param $0 f32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $min_vd (param $0 f32))
)
diff --git a/test/lit/passes/global-refining.wast b/test/lit/passes/global-refining.wast
index 1ede2009e..927dfd1f2 100644
--- a/test/lit/passes/global-refining.wast
+++ b/test/lit/passes/global-refining.wast
@@ -18,10 +18,8 @@
;; CLOSD: (global $func-func-init (mut (ref $foo_t)) (ref.func $foo))
(global $func-func-init (mut funcref) (ref.func $foo))
;; CHECK: (func $foo (type $foo_t)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CLOSD: (func $foo (type $foo_t)
- ;; CLOSD-NEXT: (nop)
;; CLOSD-NEXT: )
(func $foo (type $foo_t))
)
@@ -188,10 +186,8 @@
(global $b (ref $super) (global.get $a))
;; CHECK: (func $func (type $sub)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CLOSD: (func $func (type $sub)
- ;; CLOSD-NEXT: (nop)
;; CLOSD-NEXT: )
(func $func (type $sub)
)
diff --git a/test/lit/passes/gto-removals.wast b/test/lit/passes/gto-removals.wast
index 99579f8ab..a6fd9c228 100644
--- a/test/lit/passes/gto-removals.wast
+++ b/test/lit/passes/gto-removals.wast
@@ -12,7 +12,6 @@
;; CHECK: (type $1 (func (param (ref $struct))))
;; CHECK: (func $func (type $1) (param $x (ref $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (param $x (ref $struct))
)
@@ -328,23 +327,18 @@
)
;; CHECK: (func $func-0 (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-0)
;; CHECK: (func $func-1 (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-1)
;; CHECK: (func $func-2 (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-2)
;; CHECK: (func $func-3 (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-3)
;; CHECK: (func $func-4 (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-4)
)
@@ -1254,7 +1248,6 @@
;; CHECK: (type $2 (func (param (ref $B))))
;; CHECK: (func $func (type $2) (param $x (ref $B))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (param $x (ref $B))
;; Use $B in a param to keep it alive, and lead us to process it and $A.
@@ -1273,7 +1266,6 @@
;; CHECK: (type $2 (func (param (ref $B))))
;; CHECK: (func $func (type $2) (param $x (ref $B))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (param $x (ref $B))
)
diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast
index 6722d0ed4..9772745bc 100644
--- a/test/lit/passes/gufa-refs.wast
+++ b/test/lit/passes/gufa-refs.wast
@@ -1917,7 +1917,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $nothing
;; CHECK-NEXT: (local.set $0
@@ -1943,7 +1942,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $something
;; CHECK-NEXT: (drop
@@ -2146,7 +2144,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $tag
;; CHECK-NEXT: (local.set $0
@@ -2164,7 +2161,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $tag
;; CHECK-NEXT: (drop
@@ -2393,7 +2389,6 @@
)
;; CHECK: (func $foo (type $1)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
)
diff --git a/test/lit/passes/heap2local.wast b/test/lit/passes/heap2local.wast
index 179437c38..bad4a33bf 100644
--- a/test/lit/passes/heap2local.wast
+++ b/test/lit/passes/heap2local.wast
@@ -485,7 +485,6 @@
)
;; CHECK: (func $send-ref (type $5) (param $0 (ref null $struct.A))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $send-ref (param (ref null $struct.A))
)
diff --git a/test/lit/passes/inlining-eh-legacy.wast b/test/lit/passes/inlining-eh-legacy.wast
index 9135f786e..4d9d3a7aa 100644
--- a/test/lit/passes/inlining-eh-legacy.wast
+++ b/test/lit/passes/inlining-eh-legacy.wast
@@ -25,7 +25,6 @@
;; CHECK-NEXT: (block $__inlined_func$callee-with-label
;; CHECK-NEXT: (try $label0
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $tag$0
;; CHECK-NEXT: (drop
@@ -52,7 +51,6 @@
;; CHECK: (func $callee-with-try-delegate (type $0)
;; CHECK-NEXT: (try $label$3
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (delegate 0)
;; CHECK-NEXT: )
@@ -83,7 +81,6 @@
;; CHECK: (func $caller-with-try-delegate (type $2) (result i32)
;; CHECK-NEXT: (try $label$3
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (delegate 0)
;; CHECK-NEXT: )
@@ -107,14 +104,14 @@
;; CHECK-NEXT: (local $0 i32)
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $tag$0
;; CHECK-NEXT: (block $__inlined_func$callee-b$2
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (pop i32)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -144,7 +141,6 @@
;; CHECK-NEXT: (local $2 i32)
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $tag$0
;; CHECK-NEXT: (local.set $2
@@ -159,7 +155,8 @@
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
diff --git a/test/lit/passes/inlining-gc.wast b/test/lit/passes/inlining-gc.wast
index 8da522e1d..445cbf042 100644
--- a/test/lit/passes/inlining-gc.wast
+++ b/test/lit/passes/inlining-gc.wast
@@ -8,7 +8,8 @@
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (ref.null nofunc)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $caller-nullable
@@ -27,7 +28,8 @@
;; CHECK: (func $caller-non-nullable (type $0)
;; CHECK-NEXT: (local $0 (ref func))
;; CHECK-NEXT: (block $__inlined_func$target-non-nullable$1
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $caller-non-nullable
diff --git a/test/lit/passes/inlining_all-features.wast b/test/lit/passes/inlining_all-features.wast
index 38d24ab72..860f5b8f7 100644
--- a/test/lit/passes/inlining_all-features.wast
+++ b/test/lit/passes/inlining_all-features.wast
@@ -15,13 +15,13 @@
;; $foo should not be removed after being inlined, because there is 'ref.func'
;; instruction that refers to it
;; CHECK: (func $foo (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
;; CHECK: (func $ref_func_test (type $1) (result funcref)
;; CHECK-NEXT: (block $__inlined_func$foo
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (ref.func $foo)
;; CHECK-NEXT: )
@@ -160,7 +160,8 @@
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $caller-with-pop-twice
diff --git a/test/lit/passes/inlining_splitting.wast b/test/lit/passes/inlining_splitting.wast
index 84c0b9832..f3d7f44a4 100644
--- a/test/lit/passes/inlining_splitting.wast
+++ b/test/lit/passes/inlining_splitting.wast
@@ -856,7 +856,6 @@
)
;; CHECK: (func $byn-split-outlined-A$colliding-name (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $byn-split-outlined-A$colliding-name
;; This function's name might collide with the split function we create for
diff --git a/test/lit/passes/instrument-locals-eh-legacy.wast b/test/lit/passes/instrument-locals-eh-legacy.wast
index 8ee553554..23d944a0c 100644
--- a/test/lit/passes/instrument-locals-eh-legacy.wast
+++ b/test/lit/passes/instrument-locals-eh-legacy.wast
@@ -9,7 +9,6 @@
;; CHECK-NEXT: (local $x i32)
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $e
;; CHECK-NEXT: (local.set $x
diff --git a/test/lit/passes/j2cl-merge-itables.wast b/test/lit/passes/j2cl-merge-itables.wast
index 499f598e1..8506724fd 100644
--- a/test/lit/passes/j2cl-merge-itables.wast
+++ b/test/lit/passes/j2cl-merge-itables.wast
@@ -65,7 +65,6 @@
(struct.new $Object.vtable))
;; CHECK: (func $SubObject.f (type $function)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $SubObject.f
(type $function)
@@ -180,7 +179,6 @@
(struct.new_default $Object.itable))
;; CHECK: (func $SubObject.f (type $function)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $SubObject.f
(type $function)
diff --git a/test/lit/passes/j2cl.wast b/test/lit/passes/j2cl.wast
index 4fe661e5c..e17d9f43c 100644
--- a/test/lit/passes/j2cl.wast
+++ b/test/lit/passes/j2cl.wast
@@ -212,7 +212,6 @@
;; CHECK: (func $notOnceFunction@Zoo (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $notOnceFunction@Zoo
)
@@ -225,7 +224,6 @@
)
;; CHECK: (func $empty_<once>_@Zoo (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $empty_<once>_@Zoo
)
@@ -255,7 +253,8 @@
;; CHECK: (func $caller_@Zoo (type $1) (result i32)
;; CHECK-NEXT: (nop)
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: (call $notOnceFunction@Zoo)
;; CHECK-NEXT: (global.set $$var2@Zoo
;; CHECK-NEXT: (i32.const 3)
diff --git a/test/lit/passes/legalize-js-interface-exported-helpers.wast b/test/lit/passes/legalize-js-interface-exported-helpers.wast
index 707cbe5c9..bed768f1a 100644
--- a/test/lit/passes/legalize-js-interface-exported-helpers.wast
+++ b/test/lit/passes/legalize-js-interface-exported-helpers.wast
@@ -31,7 +31,6 @@
(i64.const 0)
)
;; CHECK: (func $__set_temp_ret (param $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $__set_temp_ret (param i32))
;; CHECK: (func $__get_temp_ret (result i32)
diff --git a/test/lit/passes/local-cse_all-features.wast b/test/lit/passes/local-cse_all-features.wast
index 8878d595f..e8d7da4c7 100644
--- a/test/lit/passes/local-cse_all-features.wast
+++ b/test/lit/passes/local-cse_all-features.wast
@@ -509,7 +509,6 @@
)
;; CHECK: (func $callee (type $2) (param $x i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $callee (param $x i32)
)
diff --git a/test/lit/passes/monomorphize-context.wast b/test/lit/passes/monomorphize-context.wast
index cc4bdfc9d..7f9cb2f56 100644
--- a/test/lit/passes/monomorphize-context.wast
+++ b/test/lit/passes/monomorphize-context.wast
@@ -177,7 +177,6 @@
)
;; ALWAYS: (func $target (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 anyref) (param $11 funcref) (param $12 i32) (param $13 f64) (param $14 i32) (param $15 anyref) (param $16 anyref)
- ;; ALWAYS-NEXT: (nop)
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 anyref) (param $11 funcref) (param $12 i32) (param $13 f64) (param $14 i32) (param $15 anyref) (param $16 anyref)
;; CAREFUL-NEXT: (nop)
@@ -285,7 +284,8 @@
;; ALWAYS-NEXT: (local.set $22
;; ALWAYS-NEXT: (struct.new_default $struct)
;; ALWAYS-NEXT: )
-;; ALWAYS-NEXT: (nop)
+;; ALWAYS-NEXT: (block
+;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target_2 (type $2) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32)
@@ -1333,7 +1333,6 @@
)
;; ALWAYS: (func $target (type $1) (param $0 i32) (param $1 i32)
- ;; ALWAYS-NEXT: (nop)
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target (type $1) (param $0 i32) (param $1 i32)
;; CAREFUL-NEXT: (nop)
@@ -1353,7 +1352,8 @@
;; ALWAYS-NEXT: (i32.const 0)
;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
-;; ALWAYS-NEXT: (nop)
+;; ALWAYS-NEXT: (block
+;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
(module
(memory 10 20)
@@ -1414,7 +1414,6 @@
)
;; ALWAYS: (func $target (type $0) (param $0 i32)
- ;; ALWAYS-NEXT: (nop)
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target (type $1) (param $0 i32)
;; CAREFUL-NEXT: (nop)
@@ -1432,7 +1431,8 @@
;; ALWAYS-NEXT: (i32.const 1)
;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
-;; ALWAYS-NEXT: (nop)
+;; ALWAYS-NEXT: (block
+;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
(module
;; ALWAYS: (type $0 (func))
@@ -1551,7 +1551,6 @@
)
;; ALWAYS: (func $target (type $2) (param $0 anyref)
- ;; ALWAYS-NEXT: (nop)
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target (type $1) (param $0 anyref)
;; CAREFUL-NEXT: (nop)
@@ -1569,7 +1568,8 @@
;; ALWAYS-NEXT: (local.get $1)
;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
-;; ALWAYS-NEXT: (nop)
+;; ALWAYS-NEXT: (block
+;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
;; ALWAYS: (func $target_4 (type $4) (param $0 i32)
@@ -1582,7 +1582,8 @@
;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
-;; ALWAYS-NEXT: (nop)
+;; ALWAYS-NEXT: (block
+;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target_3 (type $2) (param $0 i32) (param $1 i32)
@@ -1719,7 +1720,6 @@
)
;; ALWAYS: (func $target (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32)
- ;; ALWAYS-NEXT: (nop)
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32)
;; CAREFUL-NEXT: (nop)
@@ -1756,7 +1756,8 @@
;; ALWAYS-NEXT: (i32.const 0)
;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
-;; ALWAYS-NEXT: (nop)
+;; ALWAYS-NEXT: (block
+;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
(module
;; ALWAYS: (type $0 (func))
@@ -1795,10 +1796,8 @@
)
;; ALWAYS: (func $target (type $1) (param $0 f32)
- ;; ALWAYS-NEXT: (nop)
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target (type $1) (param $0 f32)
- ;; CAREFUL-NEXT: (nop)
;; CAREFUL-NEXT: )
(func $target (param $0 f32)
)
diff --git a/test/lit/passes/monomorphize-limits.wast b/test/lit/passes/monomorphize-limits.wast
index 344f55b51..29dd9de20 100644
--- a/test/lit/passes/monomorphize-limits.wast
+++ b/test/lit/passes/monomorphize-limits.wast
@@ -112,7 +112,6 @@
)
;; ALWAYS: (func $many-params (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) (param $11 i32) (param $12 i32) (param $13 i32) (param $14 i32) (param $15 i32) (param $16 i32) (param $17 i32) (param $18 i32) (param $19 i32) (param $20 i32) (param $21 i32) (param $22 i32) (param $23 i32) (param $24 i32)
- ;; ALWAYS-NEXT: (nop)
;; ALWAYS-NEXT: )
;; CAREFUL: (func $many-params (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) (param $11 i32) (param $12 i32) (param $13 i32) (param $14 i32) (param $15 i32) (param $16 i32) (param $17 i32) (param $18 i32) (param $19 i32) (param $20 i32) (param $21 i32) (param $22 i32) (param $23 i32) (param $24 i32)
;; CAREFUL-NEXT: (nop)
@@ -227,7 +226,8 @@
;; ALWAYS-NEXT: (local.set $24
;; ALWAYS-NEXT: (i32.const 25)
;; ALWAYS-NEXT: )
-;; ALWAYS-NEXT: (nop)
+;; ALWAYS-NEXT: (block
+;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
;; CAREFUL: (func $many-params_3 (type $0)
@@ -353,7 +353,6 @@
)
;; ALWAYS: (func $target (type $3) (param $array (ref $array))
- ;; ALWAYS-NEXT: (nop)
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target (type $3) (param $0 (ref $array))
;; CAREFUL-NEXT: (nop)
@@ -392,7 +391,8 @@
;; ALWAYS-NEXT: (i32.const 25)
;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
-;; ALWAYS-NEXT: (nop)
+;; ALWAYS-NEXT: (block
+;; ALWAYS-NEXT: )
;; ALWAYS-NEXT: )
;; CAREFUL: (func $target_3 (type $1)
diff --git a/test/lit/passes/name-types.wast b/test/lit/passes/name-types.wast
index bb31ffc82..bde56309f 100644
--- a/test/lit/passes/name-types.wast
+++ b/test/lit/passes/name-types.wast
@@ -34,7 +34,6 @@
;; CHECK: (type $type (func (param (ref $type_1) (ref $reasonable-name) (ref $lintable-name) (ref $unlintable-name_7) (ref $unlintable-name) (ref $onelintable-name) (ref $onelintable-name_8))))
;; CHECK: (func $foo (type $type) (param $x (ref $type_1)) (param $y (ref $reasonable-name)) (param $z (ref $lintable-name)) (param $w (ref $unlintable-name_7)) (param $t (ref $unlintable-name)) (param $a (ref $onelintable-name)) (param $b (ref $onelintable-name_8))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; Use the types to keep them alive.
diff --git a/test/lit/passes/once-reduction.wast b/test/lit/passes/once-reduction.wast
index af9f4f113..640d14461 100644
--- a/test/lit/passes/once-reduction.wast
+++ b/test/lit/passes/once-reduction.wast
@@ -201,7 +201,6 @@
)
;; CHECK: (func $caller-empty (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $caller-empty
;; A tiny function with nothing at all, just to verify we do not crash on
@@ -1481,7 +1480,6 @@
)
;; CHECK: (func $bad-B (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $bad-B
)
@@ -2022,7 +2020,6 @@
)
;; CHECK: (func $other (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $other
)
diff --git a/test/lit/passes/optimize-casts-noeh.wast b/test/lit/passes/optimize-casts-noeh.wast
index 3cee5f3d4..3c3b5f8c5 100644
--- a/test/lit/passes/optimize-casts-noeh.wast
+++ b/test/lit/passes/optimize-casts-noeh.wast
@@ -63,7 +63,6 @@
)
;; CHECK: (func $none (type $2)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $none
;; Helper for the above.
diff --git a/test/lit/passes/optimize-casts.wast b/test/lit/passes/optimize-casts.wast
index acf8fc7b4..0719cbd91 100644
--- a/test/lit/passes/optimize-casts.wast
+++ b/test/lit/passes/optimize-casts.wast
@@ -1398,7 +1398,6 @@
)
;; CHECK: (func $void (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $void
;; Helper for the above.
diff --git a/test/lit/passes/optimize-instructions-call_ref-roundtrip.wast b/test/lit/passes/optimize-instructions-call_ref-roundtrip.wast
index 05f03110c..c3e51d049 100644
--- a/test/lit/passes/optimize-instructions-call_ref-roundtrip.wast
+++ b/test/lit/passes/optimize-instructions-call_ref-roundtrip.wast
@@ -46,15 +46,12 @@
(ref.func $helper-3))
;; CHECK: (func $helper-1 (type $v1)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $helper-1 (type $v1))
;; CHECK: (func $helper-2 (type $v2)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $helper-2 (type $v2))
;; CHECK: (func $helper-3 (type $v3)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $helper-3 (type $v3))
diff --git a/test/lit/passes/optimize-instructions-call_ref.wast b/test/lit/passes/optimize-instructions-call_ref.wast
index 937fbe6a7..66e651a06 100644
--- a/test/lit/passes/optimize-instructions-call_ref.wast
+++ b/test/lit/passes/optimize-instructions-call_ref.wast
@@ -189,7 +189,6 @@
;; Helper function for the above test.
;; CHECK: (func $return-nothing (type $none_=>_none)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $return-nothing)
diff --git a/test/lit/passes/optimize-instructions-eh-legacy.wast b/test/lit/passes/optimize-instructions-eh-legacy.wast
index a6c650183..dd51d6c17 100644
--- a/test/lit/passes/optimize-instructions-eh-legacy.wast
+++ b/test/lit/passes/optimize-instructions-eh-legacy.wast
@@ -6,7 +6,6 @@
;; CHECK: (tag $e (param i32))
;; CHECK: (func $dummy (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $dummy)
(tag $e (param i32))
@@ -164,7 +163,6 @@
;; CHECK-NEXT: (call $dummy)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 1)
@@ -209,7 +207,6 @@
;; CHECK-NEXT: (do
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
;; CHECK-NEXT: (call $dummy)
diff --git a/test/lit/passes/optimize-instructions-gc-iit.wast b/test/lit/passes/optimize-instructions-gc-iit.wast
index ab3005af5..224e53d40 100644
--- a/test/lit/passes/optimize-instructions-gc-iit.wast
+++ b/test/lit/passes/optimize-instructions-gc-iit.wast
@@ -19,10 +19,8 @@
(type $other (struct (field i64) (field f32)))
;; CHECK: (func $foo (type $3)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; TNH: (func $foo (type $3)
- ;; TNH-NEXT: (nop)
;; TNH-NEXT: )
(func $foo)
diff --git a/test/lit/passes/optimize-instructions-gc.wast b/test/lit/passes/optimize-instructions-gc.wast
index 21d6291a9..4b88507ff 100644
--- a/test/lit/passes/optimize-instructions-gc.wast
+++ b/test/lit/passes/optimize-instructions-gc.wast
@@ -472,7 +472,6 @@
)
;; CHECK: (func $nothing (type $5)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $nothing)
diff --git a/test/lit/passes/optimize-instructions-iit-eh-legacy.wast b/test/lit/passes/optimize-instructions-iit-eh-legacy.wast
index c0e4a05da..79cb6f6f1 100644
--- a/test/lit/passes/optimize-instructions-iit-eh-legacy.wast
+++ b/test/lit/passes/optimize-instructions-iit-eh-legacy.wast
@@ -11,7 +11,6 @@
;; CHECK: (func $ref-cast-statically-removed (type $2)
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $e
;; CHECK-NEXT: (throw $e
diff --git a/test/lit/passes/optimize-instructions-mvp.wast b/test/lit/passes/optimize-instructions-mvp.wast
index 8b1afa76a..f18c94c5c 100644
--- a/test/lit/passes/optimize-instructions-mvp.wast
+++ b/test/lit/passes/optimize-instructions-mvp.wast
@@ -15688,7 +15688,6 @@
)
)
;; CHECK: (func $send-i32 (param $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $send-i32 (param i32))
;; CHECK: (func $ternary-identical-arms-call (param $x i32) (param $y i32) (param $z i32)
diff --git a/test/lit/passes/remove-unused-brs-eh.wast b/test/lit/passes/remove-unused-brs-eh.wast
index 8ce578101..336b3b5a8 100644
--- a/test/lit/passes/remove-unused-brs-eh.wast
+++ b/test/lit/passes/remove-unused-brs-eh.wast
@@ -313,7 +313,6 @@
;; CHECK-NEXT: (block $middle
;; CHECK-NEXT: (block $inner
;; CHECK-NEXT: (try_table (catch $e $outer) (catch $f $outer) (catch_all $outer)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -340,7 +339,6 @@
;; CHECK-NEXT: (block $middle
;; CHECK-NEXT: (block $inner
;; CHECK-NEXT: (try_table (catch $e $outer) (catch $f $middle) (catch_all $outer)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (br $outer)
diff --git a/test/lit/passes/remove-unused-brs.wast b/test/lit/passes/remove-unused-brs.wast
index 6fcc5b066..3380db6b7 100644
--- a/test/lit/passes/remove-unused-brs.wast
+++ b/test/lit/passes/remove-unused-brs.wast
@@ -105,7 +105,6 @@
)
;; CHECK: (func $nothing (type $1)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $nothing)
diff --git a/test/lit/passes/remove-unused-brs_all-features.wast b/test/lit/passes/remove-unused-brs_all-features.wast
index 98f020274..4e722a043 100644
--- a/test/lit/passes/remove-unused-brs_all-features.wast
+++ b/test/lit/passes/remove-unused-brs_all-features.wast
@@ -115,7 +115,6 @@
(unreachable)
)
;; CHECK: (func $i32_=>_none (type $2) (param $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $i32_=>_none (param i32)
)
diff --git a/test/lit/passes/remove-unused-module-elements-refs.wast b/test/lit/passes/remove-unused-module-elements-refs.wast
index 146a25ea6..bd4940037 100644
--- a/test/lit/passes/remove-unused-module-elements-refs.wast
+++ b/test/lit/passes/remove-unused-module-elements-refs.wast
@@ -113,10 +113,8 @@
)
;; CHECK: (func $target-A (type $A)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-A (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-A (type $A)
;; This function is reachable from the export "foo": there is a RefFunc and
@@ -129,10 +127,8 @@
)
;; CHECK: (func $target-A-sub (type $A-sub)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-A-sub (type $A-sub)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-A-sub (type $A-sub)
;; This function is reachable because we have a CallRef of a supertype ($A).
@@ -142,7 +138,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-A-super (type $A-super)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-A-super (type $A-super)
;; This function is not reachable. We have a CallRef of a subtype ($A), but
@@ -153,7 +148,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-B (type $B)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-B (type $B)
;; This function is not reachable. We have a RefFunc in "foo" but no
@@ -213,10 +207,8 @@
)
;; CHECK: (func $target-A (type $A)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-A (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-A (type $A)
;; This function is reachable.
@@ -290,20 +282,16 @@
;; WORLD_OPEN-NEXT: )
;; CHECK: (func $target-A-1 (type $A)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-A-1 (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-A-1 (type $A)
;; This function is reachable.
)
;; CHECK: (func $target-A-2 (type $A)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-A-2 (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-A-2 (type $A)
;; This function is reachable.
@@ -377,20 +365,16 @@
)
;; CHECK: (func $target-A-1 (type $A)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-A-1 (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-A-1 (type $A)
;; This function is reachable.
)
;; CHECK: (func $target-A-2 (type $A)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-A-2 (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-A-2 (type $A)
;; This function is reachable.
@@ -524,10 +508,8 @@
)
;; CHECK: (func $target-keep (type $A)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-keep (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-keep (type $A)
)
@@ -536,7 +518,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-drop (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-drop (type $A)
;; In a closed world we can turn this body into unreachable.
@@ -617,19 +598,15 @@
)
;; CHECK: (func $target-keep (type $A)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-keep (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-keep (type $A)
)
;; CHECK: (func $target-keep-2 (type $A)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $target-keep-2 (type $A)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $target-keep-2 (type $A)
)
@@ -974,10 +951,8 @@
)
;; CHECK: (func $void (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $void (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $void (type $void)
;; Helper function. This is reached via a call_ref.
@@ -987,7 +962,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $a (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $a (type $void)
;; This is unreachable (in closed world) since a reference to it only exists
@@ -995,10 +969,8 @@
)
;; CHECK: (func $b (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $b (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $b (type $void)
;; This is reachable. It is in field #1, which is read, and the global
@@ -1009,7 +981,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $c (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $c (type $void)
;; Like $a, this is unreachable. That it is in a nested struct.new, and not
@@ -1017,10 +988,8 @@
)
;; CHECK: (func $d (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $d (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $d (type $void)
;; Like $b, this is reachable. That it is in a nested struct.new, and not
@@ -1031,7 +1000,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $e (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $e (type $void)
;; Side effects on the struct field are not enough to make this reachable:
@@ -1040,10 +1008,8 @@
)
;; CHECK: (func $f (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $f (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $f (type $void)
;; Like $b, this is reachable (the tee does not matter).
@@ -1053,7 +1019,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $g (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $g (type $void)
;; This is in a struct written to a field that is never read in $struct, so
@@ -1064,7 +1029,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $h (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $h (type $void)
;; This is in a struct written to a field that is never read in $struct, so
@@ -1141,10 +1105,8 @@
)
;; CHECK: (func $void (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $void (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $void (type $void)
;; Helper function. This is reached via a call_ref.
@@ -1154,7 +1116,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $a (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $a (type $void)
;; This is unreachable (in closed world) because we have no reads from the
@@ -1162,10 +1123,8 @@
)
;; CHECK: (func $b (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $b (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $b (type $void)
;; The local.tee makes this reachable: the value is not known to only reside
@@ -1503,7 +1462,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $f (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $f (type $void)
;; This is unreachable in closed world. The global it is in has a reference
@@ -1511,20 +1469,16 @@
)
;; CHECK: (func $subf (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $subf (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $subf (type $void)
;; There is a read of $substruct's field, which makes this reachable.
)
;; CHECK: (func $subsubf (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $subsubf (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $subsubf (type $void)
;; There is a read of $substruct's field, which may read from any subtype,
@@ -1607,10 +1561,8 @@
)
;; CHECK: (func $f1 (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $f1 (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $f1 (type $void)
;; The global containing this function's reference is used.
@@ -1620,7 +1572,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $f2 (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $f2 (type $void)
;; This is unreachable in closed world as the global is referred to from a
@@ -1727,7 +1678,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $f (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $f (type $void)
;; This is unreachable in closed world since $B's field is not read, so the
@@ -1851,10 +1801,8 @@
)
;; CHECK: (func $f (type $void)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; OPEN_WORLD: (func $f (type $void)
- ;; OPEN_WORLD-NEXT: (nop)
;; OPEN_WORLD-NEXT: )
(func $f (type $void)
)
diff --git a/test/lit/passes/remove-unused-module-elements_all-features.wast b/test/lit/passes/remove-unused-module-elements_all-features.wast
index 7c2ad11d8..8b4d7f186 100644
--- a/test/lit/passes/remove-unused-module-elements_all-features.wast
+++ b/test/lit/passes/remove-unused-module-elements_all-features.wast
@@ -186,7 +186,6 @@
;; CHECK: (elem $1 (i32.const 0) $f)
;; CHECK: (func $f (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $f)
)
@@ -227,7 +226,6 @@
;; CHECK: (elem $0 (i32.const 0) $waka)
;; CHECK: (func $waka (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $waka)
)
@@ -459,7 +457,6 @@
;; CHECK: (elem $0 (global.get $tableBase) $waka)
;; CHECK: (func $waka (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $waka) ;; used in table
)
@@ -819,7 +816,6 @@
)
;; CHECK: (func $internal (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $internal
)
diff --git a/test/lit/passes/remove-unused-module-elements_tnh.wast b/test/lit/passes/remove-unused-module-elements_tnh.wast
index 22c09740d..537843191 100644
--- a/test/lit/passes/remove-unused-module-elements_tnh.wast
+++ b/test/lit/passes/remove-unused-module-elements_tnh.wast
@@ -162,12 +162,10 @@
(elem $bad (i32.const 10) $func)
;; CHECK: (func $func (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; T_N_H: (type $0 (func))
;; T_N_H: (func $func (type $0)
- ;; T_N_H-NEXT: (nop)
;; T_N_H-NEXT: )
(func $func)
)
@@ -190,12 +188,10 @@
(elem $bad (i32.const 9) $func $func)
;; CHECK: (func $func (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; T_N_H: (type $0 (func))
;; T_N_H: (func $func (type $0)
- ;; T_N_H-NEXT: (nop)
;; T_N_H-NEXT: )
(func $func)
)
@@ -211,12 +207,10 @@
;; CHECK: (type $0 (func))
;; CHECK: (func $func (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; T_N_H: (type $0 (func))
;; T_N_H: (func $func (type $0)
- ;; T_N_H-NEXT: (nop)
;; T_N_H-NEXT: )
(func $func)
)
diff --git a/test/lit/passes/remove-unused-names-eh-legacy.wast b/test/lit/passes/remove-unused-names-eh-legacy.wast
index 729e50add..797dabb55 100644
--- a/test/lit/passes/remove-unused-names-eh-legacy.wast
+++ b/test/lit/passes/remove-unused-names-eh-legacy.wast
@@ -8,7 +8,6 @@
;; CHECK: (func $func0 (type $0)
;; CHECK-NEXT: (try $label$9
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
;; CHECK-NEXT: (try $label$8
diff --git a/test/lit/passes/rse-eh-legacy.wast b/test/lit/passes/rse-eh-legacy.wast
index 7cdb2bccf..95a1459c3 100644
--- a/test/lit/passes/rse-eh-legacy.wast
+++ b/test/lit/passes/rse-eh-legacy.wast
@@ -11,7 +11,6 @@
;; CHECK-NEXT: (local $x i32)
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
;; CHECK-NEXT: (local.set $x
@@ -47,7 +46,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $x
@@ -102,7 +100,6 @@
)
;; CHECK: (func $foo (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
@@ -116,7 +113,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $x
@@ -147,7 +143,6 @@
;; CHECK-NEXT: (call $foo)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
@@ -235,7 +230,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
@@ -285,7 +279,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $x
@@ -498,7 +491,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -560,7 +552,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $x
@@ -690,7 +681,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $x
@@ -754,7 +744,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -762,7 +751,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
diff --git a/test/lit/passes/rse-eh.wast b/test/lit/passes/rse-eh.wast
index 100543ae9..8c26946b1 100644
--- a/test/lit/passes/rse-eh.wast
+++ b/test/lit/passes/rse-eh.wast
@@ -14,7 +14,6 @@
(tag $e-empty)
;; CHECK: (func $foo (type $0)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
@@ -23,7 +22,6 @@
;; CHECK-NEXT: (block $outer
;; CHECK-NEXT: (block $catch_all
;; CHECK-NEXT: (try_table (catch_all $catch_all)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (br $outer)
;; CHECK-NEXT: )
diff --git a/test/lit/passes/rse-gc.wast b/test/lit/passes/rse-gc.wast
index 26a973da0..d00f6d3c4 100644
--- a/test/lit/passes/rse-gc.wast
+++ b/test/lit/passes/rse-gc.wast
@@ -13,7 +13,6 @@
;; CHECK: (func $test (type $3)
;; CHECK-NEXT: (local $single (ref func))
;; CHECK-NEXT: (local $tuple (tuple (ref any) (ref any)))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $test
;; A non-nullable local. The pass should ignore it (as we cannot optimize
diff --git a/test/lit/passes/signature-pruning.wast b/test/lit/passes/signature-pruning.wast
index b5c5b26e2..6a20d2815 100644
--- a/test/lit/passes/signature-pruning.wast
+++ b/test/lit/passes/signature-pruning.wast
@@ -308,7 +308,6 @@
;; CHECK-NEXT: (local $1 f32)
;; CHECK-NEXT: (local $2 i64)
;; CHECK-NEXT: (local $3 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo (type $sig) (param $i32 i32) (param $i64 i64) (param $f32 f32) (param $f64 f64)
;; Use nothing at all: all params can be removed.
@@ -394,7 +393,6 @@
;; CHECK: (func $foo (type $sig)
;; CHECK-NEXT: (local $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo (type $sig) (param $i32 i32)
;; This function does not use the parameter. It also has no calls, but that
@@ -416,7 +414,6 @@
;; CHECK: (memory $0 1 1)
;; CHECK: (func $foo (type $sig) (param $i32 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo (type $sig) (param $i32 i32)
)
@@ -431,7 +428,6 @@
;; CHECK: (memory $0 1 1)
;; CHECK: (func $foo (type $sig) (param $i32 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo (type $sig) (param $i32 i32)
)
@@ -469,7 +465,6 @@
;; CHECK: (func $foo (type $sig)
;; CHECK-NEXT: (local $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo (type $sig) (param $i32 i32)
)
@@ -505,14 +500,12 @@
;; CHECK: (func $foo (type $sig)
;; CHECK-NEXT: (local $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo (type $sig) (param $i32 i32)
)
;; CHECK: (func $bar (type $sig)
;; CHECK-NEXT: (local $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $bar (type $sig) (param $i32 i32)
;; As above, but the second function also does not use the parameter, and
@@ -574,7 +567,6 @@
;; CHECK: (table $0 1 1 anyref)
;; CHECK: (func $foo (type $sig) (param $i32 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo (type $sig) (param $i32 i32)
)
@@ -593,13 +585,11 @@
;; CHECK: (export "bar" (func $bar))
;; CHECK: (func $foo (type $sig) (param $i32 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo (export "foo") (type $sig) (param $i32 i32)
)
;; CHECK: (func $bar (type $sig) (param $i32 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $bar (export "bar") (type $sig) (param $i32 i32)
)
@@ -632,14 +622,12 @@
;; CHECK: (func $foo1 (type $sig1)
;; CHECK-NEXT: (local $0 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo1 (type $sig1) (param $i32 i32)
)
;; CHECK: (func $foo2 (type $sig2)
;; CHECK-NEXT: (local $0 f64)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo2 (type $sig2) (param $f64 f64)
)
@@ -1174,13 +1162,11 @@
;; CHECK: (export "exported" (func $exported))
;; CHECK: (func $exported (type $none)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $exported (export "exported") (type $none)
)
;; CHECK: (func $unused-param (type $much) (param $param i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $unused-param (type $much) (param $param i32)
)
@@ -1219,14 +1205,12 @@
;; CHECK: (export "exported" (func $exported))
;; CHECK: (func $exported (type $none)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $exported (export "exported") (type $none)
;; This makes the rec group public.
)
;; CHECK: (func $unused-param (type $much) (param $param i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $unused-param (type $much) (param $param i32)
)
diff --git a/test/lit/passes/signature-refining.wast b/test/lit/passes/signature-refining.wast
index f6f889408..b401237b8 100644
--- a/test/lit/passes/signature-refining.wast
+++ b/test/lit/passes/signature-refining.wast
@@ -17,7 +17,6 @@
(type $sig (sub (func (param anyref))))
;; CHECK: (func $func (type $sig) (param $x (ref $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (type $sig) (param $x anyref)
)
@@ -49,7 +48,6 @@
;; CHECK: (elem declare func $func)
;; CHECK: (func $func (type $sig) (param $x (ref $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (type $sig) (param $x anyref)
)
@@ -85,7 +83,6 @@
;; CHECK: (elem declare func $func)
;; CHECK: (func $func (type $sig) (param $x eqref)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (type $sig) (param $x anyref)
)
@@ -140,13 +137,11 @@
)
;; CHECK: (func $func-1 (type $sig) (param $x (ref $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-1 (type $sig) (param $x anyref)
)
;; CHECK: (func $func-2 (type $sig) (param $x (ref $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-2 (type $sig) (param $x anyref)
)
@@ -184,13 +179,11 @@
(type $struct (struct))
;; CHECK: (func $func-1 (type $sig) (param $x (ref $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-1 (type $sig) (param $x anyref)
)
;; CHECK: (func $func-2 (type $sig) (param $x (ref $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-2 (type $sig) (param $x anyref)
)
@@ -288,7 +281,6 @@
;; CHECK: (elem declare func $func)
;; CHECK: (func $func (type $sig) (param $x (ref $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (type $sig) (param $x anyref)
)
@@ -327,7 +319,6 @@
;; CHECK: (elem declare func $func)
;; CHECK: (func $func (type $sig) (param $x anyref)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (type $sig) (param $x anyref)
)
@@ -356,7 +347,6 @@
(type $sig (sub (func (param anyref))))
;; CHECK: (func $func (type $sig) (param $x anyref)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (type $sig) (param $x anyref)
)
@@ -381,13 +371,11 @@
;; CHECK: (elem declare func $func-2)
;; CHECK: (func $func-1 (type $sig-1) (param $x structref) (param $y anyref)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-1 (type $sig-1) (param $x anyref) (param $y anyref)
)
;; CHECK: (func $func-2 (type $sig-2) (param $x eqref) (param $y (ref $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func-2 (type $sig-2) (param $x anyref) (param $y anyref)
)
@@ -455,7 +443,6 @@
;; CHECK: (table $0 1 1 anyref)
;; CHECK: (func $func (type $sig) (param $x anyref)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (type $sig) (param $x anyref)
)
@@ -487,7 +474,6 @@
(type $struct (struct))
;; CHECK: (func $func (type $sig) (param $x (ref null $struct))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (type $sig) (param $x anyref)
)
@@ -692,7 +678,6 @@
;; CHECK: (export "prevent-opts" (func $func))
;; CHECK: (func $func (type $sig) (param $x anyref)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (export "prevent-opts") (type $sig) (param $x anyref)
)
@@ -1057,7 +1042,6 @@
)
;; CHECK: (func $target (type $5) (param $x (ref $A))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $target (param $x (ref $A))
;; Because of the two calls above, this cannot be refined.
@@ -1109,7 +1093,6 @@
)
;; CHECK: (func $target (type $1) (param $x (ref $B))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $target (param $x (ref $A))
;; The two calls above both send $B, so we can refine the parameter to $B.
@@ -1142,7 +1125,6 @@
(export "struct" (global $struct))
;; CHECK: (func $func (type $sig) (param $x anyref)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $func (type $sig) (param $x anyref)
)
diff --git a/test/lit/passes/simplify-locals-eh-legacy.wast b/test/lit/passes/simplify-locals-eh-legacy.wast
index d7fb75776..f9ab2f8c1 100644
--- a/test/lit/passes/simplify-locals-eh-legacy.wast
+++ b/test/lit/passes/simplify-locals-eh-legacy.wast
@@ -5,14 +5,12 @@
;; CHECK: (tag $e-i32 (param i32))
(tag $e-i32 (param i32))
;; CHECK: (func $foo (type $3) (param $0 i32) (param $1 i32)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo (param i32 i32))
;; CHECK: (func $pop-cannot-be-sinked (type $0)
;; CHECK-NEXT: (local $0 i32)
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $e-i32
;; CHECK-NEXT: (local.set $0
@@ -44,7 +42,6 @@
;; CHECK-NEXT: (local $0 i32)
;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
;; CHECK-NEXT: (nop)
diff --git a/test/lit/passes/simplify-locals-gc.wast b/test/lit/passes/simplify-locals-gc.wast
index b3f6ac2fc..85ec16d99 100644
--- a/test/lit/passes/simplify-locals-gc.wast
+++ b/test/lit/passes/simplify-locals-gc.wast
@@ -262,7 +262,6 @@
)
;; CHECK: (func $helper (type $8) (param $ref (ref func))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $helper (param $ref (ref func))
)
@@ -491,14 +490,12 @@
)
;; CHECK: (func $use-nn-any (type $15) (param $nn-any (ref any))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $use-nn-any (param $nn-any (ref any))
;; Helper function for the above.
)
;; CHECK: (func $use-any (type $7) (param $any anyref)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $use-any (param $any anyref)
;; Helper function for the above.
diff --git a/test/lit/passes/simplify-locals-global.wast b/test/lit/passes/simplify-locals-global.wast
index 215b32a3c..a471225d9 100644
--- a/test/lit/passes/simplify-locals-global.wast
+++ b/test/lit/passes/simplify-locals-global.wast
@@ -45,7 +45,6 @@
)
;; CHECK: (func $helper
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $helper)
)
diff --git a/test/lit/passes/ssa.wast b/test/lit/passes/ssa.wast
index 68b853607..b082cd888 100644
--- a/test/lit/passes/ssa.wast
+++ b/test/lit/passes/ssa.wast
@@ -6,7 +6,6 @@
(type $A (struct ))
;; CHECK: (func $foo (type $1)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo)
diff --git a/test/lit/passes/stack-ir-roundtrip-eh-legacy.wast b/test/lit/passes/stack-ir-roundtrip-eh-legacy.wast
index cedcdbf45..439681a8f 100644
--- a/test/lit/passes/stack-ir-roundtrip-eh-legacy.wast
+++ b/test/lit/passes/stack-ir-roundtrip-eh-legacy.wast
@@ -9,7 +9,6 @@
;; CHECK-NEXT: (do
;; CHECK-NEXT: (try $label$7
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $tag
;; CHECK-NEXT: (drop
@@ -17,7 +16,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (try $label$6
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; CHECK-NEXT: (delegate 2)
;; CHECK-NEXT: )
diff --git a/test/lit/passes/string-lowering_types.wast b/test/lit/passes/string-lowering_types.wast
index cab84a1b8..2274fcaf9 100644
--- a/test/lit/passes/string-lowering_types.wast
+++ b/test/lit/passes/string-lowering_types.wast
@@ -65,7 +65,6 @@
;; CHECK: (func $export (type $4)
;; CHECK-NEXT: (local $0 (ref $private))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $export (export "export")
;; Keep the private type alive.
diff --git a/test/lit/passes/translate-to-exnref.wast b/test/lit/passes/translate-to-exnref.wast
index 8bac0dc39..388bcf8bd 100644
--- a/test/lit/passes/translate-to-exnref.wast
+++ b/test/lit/passes/translate-to-exnref.wast
@@ -43,19 +43,16 @@
(tag $e-i32-i64 (param i32 i64))
;; CHECK: (func $foo (type $1)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; STACKIR-OPT: (func $foo (type $1)
;; STACKIR-OPT-NEXT: )
(func $foo)
;; CHECK: (func $bar (type $1)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; STACKIR-OPT: (func $bar (type $1)
;; STACKIR-OPT-NEXT: )
(func $bar)
;; CHECK: (func $baz (type $1)
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
;; STACKIR-OPT: (func $baz (type $1)
;; STACKIR-OPT-NEXT: )
@@ -1621,7 +1618,8 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; STACKIR-OPT: (func $delegate-target-outer-try-none (type $1)
@@ -1678,7 +1676,8 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; STACKIR-OPT: (func $multiple-delegates-target-outer-try-none (type $1)
@@ -1963,14 +1962,16 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (br $outer1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (br $outer3)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; STACKIR-OPT: (func $delegate-nested-more (type $1)
diff --git a/test/lit/passes/type-finalizing.wast b/test/lit/passes/type-finalizing.wast
index 6897c6abf..f1511246b 100644
--- a/test/lit/passes/type-finalizing.wast
+++ b/test/lit/passes/type-finalizing.wast
@@ -78,7 +78,6 @@
;; UNFINAL-NEXT: (local $parent (ref $parent))
;; UNFINAL-NEXT: (local $child-final (ref $child-final))
;; UNFINAL-NEXT: (local $child-open (ref $child-open))
- ;; UNFINAL-NEXT: (nop)
;; UNFINAL-NEXT: )
;; DOFINAL: (type $3 (func))
@@ -86,7 +85,6 @@
;; DOFINAL-NEXT: (local $parent (ref $parent))
;; DOFINAL-NEXT: (local $child-final (ref $child-final))
;; DOFINAL-NEXT: (local $child-open (ref $child-open))
- ;; DOFINAL-NEXT: (nop)
;; DOFINAL-NEXT: )
(func $keepalive
(local $parent (ref $parent))
diff --git a/test/lit/passes/type-generalizing.wast b/test/lit/passes/type-generalizing.wast
index 00a809648..66e352005 100644
--- a/test/lit/passes/type-generalizing.wast
+++ b/test/lit/passes/type-generalizing.wast
@@ -54,7 +54,6 @@
;; CHECK-NEXT: (local $x i32)
;; CHECK-NEXT: (local $y anyref)
;; CHECK-NEXT: (local $z (tuple anyref i32))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $unconstrained
;; This non-ref local should be unmodified
diff --git a/test/lit/passes/type-merging-shared.wast b/test/lit/passes/type-merging-shared.wast
index fb7fa89b7..99b030f01 100644
--- a/test/lit/passes/type-merging-shared.wast
+++ b/test/lit/passes/type-merging-shared.wast
@@ -28,7 +28,6 @@
;; CHECK-NEXT: (local $b' (ref null $B'))
;; CHECK-NEXT: (local $c (ref null $C))
;; CHECK-NEXT: (local $c' (ref null $C'))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
(local $a (ref null $A))
@@ -64,7 +63,6 @@
;; CHECK-NEXT: (local $b' (ref null $B))
;; CHECK-NEXT: (local $c (ref null $C))
;; CHECK-NEXT: (local $c' (ref null $C))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
(local $a (ref null $A))
@@ -90,7 +88,6 @@
;; CHECK: (func $foo (type $2)
;; CHECK-NEXT: (local $a (ref null $A))
;; CHECK-NEXT: (local $a' (ref null $A'))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
(local $a (ref null $A))
diff --git a/test/lit/passes/type-merging.wast b/test/lit/passes/type-merging.wast
index 5d0c4bc5e..942e15b02 100644
--- a/test/lit/passes/type-merging.wast
+++ b/test/lit/passes/type-merging.wast
@@ -95,7 +95,6 @@
;; CHECK-NEXT: (local $e (ref null $D))
;; CHECK-NEXT: (local $f (ref null $D))
;; CHECK-NEXT: (local $g (ref null $D))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
(local $a (ref null $A))
@@ -139,7 +138,6 @@
;; CHECK-NEXT: (local $e (ref null $D))
;; CHECK-NEXT: (local $f (ref null $D))
;; CHECK-NEXT: (local $g (ref null $D))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
(local $a (ref null $A))
@@ -169,7 +167,6 @@
;; CHECK-NEXT: (local $a (ref null $A))
;; CHECK-NEXT: (local $b (ref null $A))
;; CHECK-NEXT: (local $c (ref null $C))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; B can be merged into A even though it refines A's field because that
@@ -192,7 +189,6 @@
;; CHECK: (func $foo (type $1)
;; CHECK-NEXT: (local $a (ref null $A))
;; CHECK-NEXT: (local $b (ref null $A))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; A recursive subtype can be merged even though its field is a refinement
@@ -220,7 +216,6 @@
;; CHECK-NEXT: (local $b (ref null $A))
;; CHECK-NEXT: (local $x (ref null $X))
;; CHECK-NEXT: (local $y (ref null $X))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; Two mutually referential chains, A->B and X->Y, can be merged into a pair
@@ -249,7 +244,6 @@
;; CHECK-NEXT: (local $b (ref null $X))
;; CHECK-NEXT: (local $x (ref null $X))
;; CHECK-NEXT: (local $y (ref null $X))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; As above, but now the A->B and X->Y chains are not differentiated by the
@@ -278,7 +272,6 @@
;; CHECK-NEXT: (local $b (ref null $A))
;; CHECK-NEXT: (local $x (ref null $X))
;; CHECK-NEXT: (local $y (ref null $X))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; As above with the differentiated chains, but now the types are top-level
@@ -306,7 +299,6 @@
;; CHECK-NEXT: (local $b (ref null $X))
;; CHECK-NEXT: (local $x (ref null $X))
;; CHECK-NEXT: (local $y (ref null $X))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; As above, but with all the types merging into a single type.
@@ -429,7 +421,6 @@
;; CHECK-NEXT: (local $l' (ref null $L))
;; CHECK-NEXT: (local $m (ref null $M))
;; CHECK-NEXT: (local $m' (ref null $M))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
(local $a (ref null $A))
@@ -479,7 +470,6 @@
;; CHECK-NEXT: (local $a (ref null $A))
;; CHECK-NEXT: (local $b (ref null $B))
;; CHECK-NEXT: (local $c (ref null $B))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; B and C cannot be merged into A because they refine A's field, but B and
@@ -506,7 +496,6 @@
;; CHECK-NEXT: (local $a (ref null $A))
;; CHECK-NEXT: (local $b (ref null $B))
;; CHECK-NEXT: (local $c (ref null $B))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; This is the same as above, but now B and C refine A such that they have a
@@ -537,7 +526,6 @@
;; CHECK-NEXT: (local $c (ref null $A))
;; CHECK-NEXT: (local $d (ref null $D))
;; CHECK-NEXT: (local $e (ref null $D))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; D and E should be mergeable because they have identical shapes and will
@@ -587,7 +575,6 @@
;; CHECK-NEXT: (local $c' (ref null $C))
;; CHECK-NEXT: (local $d (ref null $D))
;; CHECK-NEXT: (local $d' (ref null $D))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
(local $a (ref null $A))
@@ -696,7 +683,6 @@
;; CHECK: (func $foo (type $3)
;; CHECK-NEXT: (local $a (ref null $intarray))
;; CHECK-NEXT: (local $b (ref null $intarray))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; $A will remain the same.
@@ -709,7 +695,6 @@
;; CHECK-NEXT: (local $a (ref null $refarray))
;; CHECK-NEXT: (local $b (ref null $refarray))
;; CHECK-NEXT: (local $c (ref null $sub-refarray-nn))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $bar
(local $a (ref null $refarray))
@@ -735,7 +720,6 @@
;; CHECK-NEXT: (local $a (ref null $func))
;; CHECK-NEXT: (local $b (ref null $func))
;; CHECK-NEXT: (local $c (ref null $sub-func-refined))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
;; $func will remain the same.
@@ -830,7 +814,6 @@
;; CHECK: (func $foo (type $3)
;; CHECK-NEXT: (local $b (ref null $A'))
;; CHECK-NEXT: (local $x (ref null $X))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $foo
(local $b (ref null $A'))
diff --git a/test/lit/passes/type-refining.wast b/test/lit/passes/type-refining.wast
index 8e8ccf24c..d045dbc1a 100644
--- a/test/lit/passes/type-refining.wast
+++ b/test/lit/passes/type-refining.wast
@@ -168,7 +168,6 @@
;; CHECK: (func $keepalive (type $4)
;; CHECK-NEXT: (local $temp (ref null $child-B))
- ;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
(func $keepalive
;; Add a reference to $child-B just to keep it alive in the output for easier