summaryrefslogtreecommitdiff
path: root/test/lit/passes/precompute-gc.wast
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-04-13 14:37:33 -0700
committerGitHub <noreply@github.com>2023-04-13 21:37:33 +0000
commit34d5e785650101c5ccec8e99c514ad1033ca3624 (patch)
tree45a3e7be4e5b69fdc6fc9f5fb2419b5f90506cfd /test/lit/passes/precompute-gc.wast
parentd2ee08a8b59e6612b5477d99dc684add5639a70b (diff)
downloadbinaryen-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/precompute-gc.wast')
-rw-r--r--test/lit/passes/precompute-gc.wast458
1 files changed, 2 insertions, 456 deletions
diff --git a/test/lit/passes/precompute-gc.wast b/test/lit/passes/precompute-gc.wast
index 782cf9b06..926c412b3 100644
--- a/test/lit/passes/precompute-gc.wast
+++ b/test/lit/passes/precompute-gc.wast
@@ -1,26 +1,21 @@
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
+
;; RUN: wasm-opt %s --remove-unused-names --precompute-propagate --fuzz-exec -all -S -o - \
;; RUN: | filecheck %s
-;; RUN: wasm-opt %s --remove-unused-names --precompute-propagate --fuzz-exec -all --nominal -S -o - \
-;; RUN: | filecheck %s --check-prefix=NOMNL
(module
;; CHECK: (type $empty (struct ))
- ;; NOMNL: (type $empty (struct ))
(type $empty (struct))
;; CHECK: (type $struct (struct (field (mut i32))))
- ;; NOMNL: (type $struct (struct (field (mut i32))))
(type $struct (struct (mut i32)))
;; two incompatible struct types
(type $A (struct (field (mut f32))))
+
;; CHECK: (type $func-return-i32 (func (result i32)))
;; CHECK: (type $B (struct (field (mut f64))))
- ;; NOMNL: (type $func-return-i32 (func (result i32)))
-
- ;; NOMNL: (type $B (struct (field (mut f64))))
(type $B (struct (field (mut f64))))
(type $struct_i8 (struct (field i8)))
@@ -30,7 +25,6 @@
(type $func-return-i32 (func (result i32)))
;; CHECK: (import "fuzzing-support" "log-i32" (func $log (param i32)))
- ;; NOMNL: (import "fuzzing-support" "log-i32" (func $log (param i32)))
(import "fuzzing-support" "log-i32" (func $log (param i32)))
;; CHECK: (func $test-fallthrough (type $func-return-i32) (result i32)
@@ -45,18 +39,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; NOMNL: (func $test-fallthrough (type $func-return-i32) (result i32)
- ;; NOMNL-NEXT: (local $x funcref)
- ;; NOMNL-NEXT: (local.set $x
- ;; NOMNL-NEXT: (block (result nullfuncref)
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (call $test-fallthrough)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (ref.null nofunc)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
(func $test-fallthrough (result i32)
(local $x funcref)
(local.set $x
@@ -109,38 +91,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $load-from-struct (type $none_=>_none)
- ;; NOMNL-NEXT: (local $x (ref null $struct))
- ;; NOMNL-NEXT: (local.set $x
- ;; NOMNL-NEXT: (struct.new $struct
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (struct.get $struct 0
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $x
- ;; NOMNL-NEXT: (struct.new $struct
- ;; NOMNL-NEXT: (i32.const 2)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (struct.get $struct 0
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (struct.set $struct 0
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: (i32.const 3)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (struct.get $struct 0
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $load-from-struct
(local $x (ref null $struct))
(local.set $x
@@ -192,27 +142,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $load-from-struct-bad-merge (type $i32_=>_none) (param $i i32)
- ;; NOMNL-NEXT: (local $x (ref null $struct))
- ;; NOMNL-NEXT: (if
- ;; NOMNL-NEXT: (local.get $i)
- ;; NOMNL-NEXT: (local.set $x
- ;; NOMNL-NEXT: (struct.new $struct
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $x
- ;; NOMNL-NEXT: (struct.new $struct
- ;; NOMNL-NEXT: (i32.const 2)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (struct.get $struct 0
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $load-from-struct-bad-merge (param $i i32)
(local $x (ref null $struct))
;; a merge of two different $x values cannot be precomputed
@@ -244,17 +173,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $modify-gc-heap (type $ref?|$struct|_=>_none) (param $x (ref null $struct))
- ;; NOMNL-NEXT: (struct.set $struct 0
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: (i32.add
- ;; NOMNL-NEXT: (struct.get $struct 0
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $modify-gc-heap (param $x (ref null $struct))
(struct.set $struct 0
(local.get $x)
@@ -284,22 +202,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $load-from-struct-bad-escape (type $none_=>_none)
- ;; NOMNL-NEXT: (local $x (ref null $struct))
- ;; NOMNL-NEXT: (local.set $x
- ;; NOMNL-NEXT: (struct.new $struct
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $modify-gc-heap
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (struct.get $struct 0
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $load-from-struct-bad-escape (export "test")
(local $x (ref null $struct))
(local.set $x
@@ -321,13 +223,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $load-from-struct-bad-arrive (type $ref?|$struct|_=>_none) (param $x (ref null $struct))
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (struct.get $struct 0
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $load-from-struct-bad-arrive (param $x (ref null $struct))
;; a parameter cannot be precomputed
(call $log
@@ -359,31 +254,6 @@
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $ref-comparisons (type $ref?|$struct|_ref?|$struct|_=>_none) (param $x (ref null $struct)) (param $y (ref null $struct))
- ;; NOMNL-NEXT: (local $z (ref null $struct))
- ;; NOMNL-NEXT: (local $w (ref null $struct))
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: (local.get $y)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: (ref.null none)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: (ref.null none)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $log
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $ref-comparisons
(param $x (ref null $struct))
(param $y (ref null $struct))
@@ -434,23 +304,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; NOMNL: (func $new-ref-comparisons (type $func-return-i32) (result i32)
- ;; NOMNL-NEXT: (local $x (ref null $struct))
- ;; NOMNL-NEXT: (local $y (ref null $struct))
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local.set $x
- ;; NOMNL-NEXT: (struct.new $struct
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $y
- ;; NOMNL-NEXT: (local.get $x)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
(func $new-ref-comparisons (result i32)
(local $x (ref null $struct))
(local $y (ref null $struct))
@@ -487,19 +340,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-equal (type $func-return-i32) (result i32)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local $tempref (ref null $empty))
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (local.tee $tempref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.get $tempref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
(func $propagate-equal (result i32)
(local $tempresult i32)
(local $tempref (ref null $empty))
@@ -525,14 +365,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-unequal (type $func-return-i32) (result i32)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local $tempref (ref null $empty))
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
(func $propagate-unequal (result i32)
(local $tempresult i32)
(local $tempref (ref null $empty))
@@ -561,17 +393,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $tempresult)
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-uncertain-param (type $ref|$empty|_=>_i32) (param $input (ref $empty)) (result i32)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local $tempref (ref null $empty))
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: (local.get $input)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.get $tempresult)
- ;; NOMNL-NEXT: )
(func $propagate-uncertain-param (param $input (ref $empty)) (result i32)
(local $tempresult i32)
(local $tempref (ref null $empty))
@@ -596,16 +417,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $tempresult)
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-different-params (type $ref|$empty|_ref|$empty|_=>_i32) (param $input1 (ref $empty)) (param $input2 (ref $empty)) (result i32)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (local.get $input1)
- ;; NOMNL-NEXT: (local.get $input2)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.get $tempresult)
- ;; NOMNL-NEXT: )
(func $propagate-different-params (param $input1 (ref $empty)) (param $input2 (ref $empty)) (result i32)
(local $tempresult i32)
(local.set $tempresult
@@ -628,16 +439,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $tempresult)
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-same-param (type $ref|$empty|_=>_i32) (param $input (ref $empty)) (result i32)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (local.get $input)
- ;; NOMNL-NEXT: (local.get $input)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.get $tempresult)
- ;; NOMNL-NEXT: )
(func $propagate-same-param (param $input (ref $empty)) (result i32)
(local $tempresult i32)
(local.set $tempresult
@@ -677,32 +478,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $tempresult)
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-uncertain-local (type $func-return-i32) (result i32)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local $tempref (ref null $empty))
- ;; NOMNL-NEXT: (local $stashedref (ref null $empty))
- ;; NOMNL-NEXT: (local.set $tempref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $stashedref
- ;; NOMNL-NEXT: (local.get $tempref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (if
- ;; NOMNL-NEXT: (call $helper
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $tempref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (local.get $tempref)
- ;; NOMNL-NEXT: (local.get $stashedref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.get $tempresult)
- ;; NOMNL-NEXT: )
(func $propagate-uncertain-local (result i32)
(local $tempresult i32)
(local $tempref (ref null $empty))
@@ -759,33 +534,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-uncertain-loop (type $none_=>_none)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local $tempref (ref null $empty))
- ;; NOMNL-NEXT: (local $stashedref (ref null $empty))
- ;; NOMNL-NEXT: (local.set $tempref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $stashedref
- ;; NOMNL-NEXT: (local.get $tempref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (loop $loop
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (local.get $tempref)
- ;; NOMNL-NEXT: (local.get $stashedref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $tempref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (br_if $loop
- ;; NOMNL-NEXT: (call $helper
- ;; NOMNL-NEXT: (local.get $tempresult)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $propagate-uncertain-loop
(local $tempresult i32)
(local $tempref (ref null $empty))
@@ -837,27 +585,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-certain-loop (type $none_=>_none)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local $tempref (ref null $empty))
- ;; NOMNL-NEXT: (local $stashedref (ref null $empty))
- ;; NOMNL-NEXT: (local.set $tempref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $stashedref
- ;; NOMNL-NEXT: (local.get $tempref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (loop $loop
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (br_if $loop
- ;; NOMNL-NEXT: (call $helper
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $propagate-certain-loop
(local $tempresult i32)
(local $tempref (ref null $empty))
@@ -906,27 +633,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-certain-loop-2 (type $none_=>_none)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local $tempref (ref null $empty))
- ;; NOMNL-NEXT: (local $stashedref (ref null $empty))
- ;; NOMNL-NEXT: (loop $loop
- ;; NOMNL-NEXT: (local.set $tempref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $stashedref
- ;; NOMNL-NEXT: (local.get $tempref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (br_if $loop
- ;; NOMNL-NEXT: (call $helper
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $propagate-certain-loop-2
(local $tempresult i32)
(local $tempref (ref null $empty))
@@ -983,35 +689,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $propagate-possibly-certain-loop (type $none_=>_none)
- ;; NOMNL-NEXT: (local $tempresult i32)
- ;; NOMNL-NEXT: (local $tempref (ref null $empty))
- ;; NOMNL-NEXT: (local $stashedref (ref null $empty))
- ;; NOMNL-NEXT: (loop $loop
- ;; NOMNL-NEXT: (if
- ;; NOMNL-NEXT: (call $helper
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $tempref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $stashedref
- ;; NOMNL-NEXT: (local.get $tempref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $tempresult
- ;; NOMNL-NEXT: (ref.eq
- ;; NOMNL-NEXT: (local.get $tempref)
- ;; NOMNL-NEXT: (local.get $stashedref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (br_if $loop
- ;; NOMNL-NEXT: (call $helper
- ;; NOMNL-NEXT: (local.get $tempresult)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $propagate-possibly-certain-loop
(local $tempresult i32)
(local $tempref (ref null $empty))
@@ -1049,9 +726,6 @@
;; CHECK: (func $helper (type $i32_=>_i32) (param $0 i32) (result i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; NOMNL: (func $helper (type $i32_=>_i32) (param $0 i32) (result i32)
- ;; NOMNL-NEXT: (unreachable)
- ;; NOMNL-NEXT: )
(func $helper (param i32) (result i32)
(unreachable)
)
@@ -1070,20 +744,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $odd-cast-and-get (type $none_=>_none)
- ;; NOMNL-NEXT: (local $temp (ref null $B))
- ;; NOMNL-NEXT: (local.set $temp
- ;; NOMNL-NEXT: (ref.null none)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (block ;; (replaces something unreachable we can't emit)
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (ref.null none)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (unreachable)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $odd-cast-and-get
(local $temp (ref null $B))
;; Try to cast a null of A to B. While the types are incompatible, ref.cast
@@ -1121,23 +781,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $odd-cast-and-get-tuple (type $none_=>_none)
- ;; NOMNL-NEXT: (local $temp ((ref null $B) i32))
- ;; NOMNL-NEXT: (local.set $temp
- ;; NOMNL-NEXT: (tuple.make
- ;; NOMNL-NEXT: (ref.null none)
- ;; NOMNL-NEXT: (i32.const 10)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (block ;; (replaces something unreachable we can't emit)
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (ref.null none)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (unreachable)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $odd-cast-and-get-tuple
(local $temp ((ref null $B) i32))
;; As above, but with a tuple.
@@ -1161,9 +804,6 @@
;; CHECK: (func $receive-f64 (type $f64_=>_none) (param $0 f64)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
- ;; NOMNL: (func $receive-f64 (type $f64_=>_none) (param $0 f64)
- ;; NOMNL-NEXT: (unreachable)
- ;; NOMNL-NEXT: )
(func $receive-f64 (param f64)
(unreachable)
)
@@ -1180,18 +820,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $odd-cast-and-get-non-null (type $ref|$func-return-i32|_=>_none) (param $temp (ref $func-return-i32))
- ;; NOMNL-NEXT: (local.set $temp
- ;; NOMNL-NEXT: (ref.cast $func-return-i32
- ;; NOMNL-NEXT: (ref.func $receive-f64)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (call_ref $func-return-i32
- ;; NOMNL-NEXT: (local.get $temp)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $odd-cast-and-get-non-null (param $temp (ref $func-return-i32))
;; Try to cast a function to an incompatible type.
(local.set $temp
@@ -1218,16 +846,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $new_block_unreachable (type $none_=>_anyref) (result anyref)
- ;; NOMNL-NEXT: (block ;; (replaces something unreachable we can't emit)
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (block
- ;; NOMNL-NEXT: (unreachable)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (unreachable)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $new_block_unreachable (result anyref)
(struct.new $struct
;; The value is a block with an unreachable. precompute will get rid of the
@@ -1249,16 +867,6 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $br_on_cast-on-creation (type $none_=>_ref|$empty|) (result (ref $empty))
- ;; NOMNL-NEXT: (block $label (result (ref $empty))
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (br_on_cast $label $empty
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (unreachable)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $br_on_cast-on-creation (result (ref $empty))
(block $label (result (ref $empty))
(drop
@@ -1302,38 +910,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $ref.is_null (type $i32_=>_none) (param $param i32)
- ;; NOMNL-NEXT: (local $ref (ref null $empty))
- ;; NOMNL-NEXT: (local.set $ref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (call $helper
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (local.set $ref
- ;; NOMNL-NEXT: (ref.null none)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (call $helper
- ;; NOMNL-NEXT: (i32.const 1)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (if
- ;; NOMNL-NEXT: (local.get $param)
- ;; NOMNL-NEXT: (local.set $ref
- ;; NOMNL-NEXT: (struct.new_default $empty)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (call $helper
- ;; NOMNL-NEXT: (ref.is_null
- ;; NOMNL-NEXT: (local.get $ref)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $ref.is_null (param $param i32)
(local $ref (ref null $empty))
;; Test ref.null on references, and also test that we can infer multiple
@@ -1391,21 +967,6 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $remove-set (type $none_=>_ref|func|) (result (ref func))
- ;; NOMNL-NEXT: (local $nn funcref)
- ;; NOMNL-NEXT: (local $i i32)
- ;; NOMNL-NEXT: (loop $loop
- ;; NOMNL-NEXT: (local.set $i
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (br $loop)
- ;; NOMNL-NEXT: (return
- ;; NOMNL-NEXT: (ref.as_non_null
- ;; NOMNL-NEXT: (local.get $nn)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $remove-set (result (ref func))
(local $nn (ref func))
(local $i i32)
@@ -1446,18 +1007,6 @@
;; CHECK-NEXT: (string.const "hello, world")
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; NOMNL: (func $strings (type $ref|string|_=>_none) (param $param (ref string))
- ;; NOMNL-NEXT: (local $s (ref string))
- ;; NOMNL-NEXT: (local.set $s
- ;; NOMNL-NEXT: (string.const "hello, world")
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $strings
- ;; NOMNL-NEXT: (string.const "hello, world")
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (call $strings
- ;; NOMNL-NEXT: (string.const "hello, world")
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
(func $strings (param $param (ref string))
(local $s (ref string))
(local.set $s
@@ -1475,9 +1024,6 @@
;; CHECK: (func $struct.new.packed (type $func-return-i32) (result i32)
;; CHECK-NEXT: (i32.const 120)
;; CHECK-NEXT: )
- ;; NOMNL: (func $struct.new.packed (type $func-return-i32) (result i32)
- ;; NOMNL-NEXT: (i32.const 120)
- ;; NOMNL-NEXT: )
(func $struct.new.packed (result i32)
;; Truncation happens when we write to this packed i8 field, so the result we
;; read back is 0x12345678 & 0xff which is 0x78 == 120.