summaryrefslogtreecommitdiff
path: root/test/lit
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit')
-rw-r--r--test/lit/basic/atomics.wast2
-rw-r--r--test/lit/basic/atomics64.wast2
-rw-r--r--test/lit/basic/multi-table.wast2
-rw-r--r--test/lit/basic/reference-types.wast2
-rw-r--r--test/lit/basic/simd.wast4
-rw-r--r--test/lit/if-then-else.wast4
-rw-r--r--test/lit/merge/renamings.wat4
-rw-r--r--test/lit/merge/renamings.wat.second4
-rw-r--r--test/lit/passes/Oz.wast2
-rw-r--r--test/lit/passes/alignment-lowering.wast12
-rw-r--r--test/lit/passes/alignment-lowering64.wast12
-rw-r--r--test/lit/passes/coalesce-locals-learning.wast3
-rw-r--r--test/lit/passes/coalesce-locals.wast9
-rw-r--r--test/lit/passes/dae-gc-refine-return.wast8
-rw-r--r--test/lit/passes/directize_all-features.wast4
-rw-r--r--test/lit/passes/flatten_all-features.wast6
-rw-r--r--test/lit/passes/flatten_simplify-locals-nonesting_dfo_O3.wast2
-rw-r--r--test/lit/passes/gufa-refs.wast2
-rw-r--r--test/lit/passes/instrument-memory.wast46
-rw-r--r--test/lit/passes/instrument-memory64.wast46
-rw-r--r--test/lit/passes/multi-memory-lowering.wast4
-rw-r--r--test/lit/passes/outlining.wast16
-rw-r--r--test/lit/passes/poppify.wast22
-rw-r--r--test/lit/passes/remove-unused-module-elements_all-features.wast47
-rw-r--r--test/lit/passes/stack-check-memory64.wast12
-rw-r--r--test/lit/passes/stack-ir-non-nullable.wast1
-rw-r--r--test/lit/passes/unsubtyping-casts.wast6
-rw-r--r--test/lit/passes/unsubtyping.wast28
-rw-r--r--test/lit/passes/vacuum_all-features.wast9
29 files changed, 148 insertions, 173 deletions
diff --git a/test/lit/basic/atomics.wast b/test/lit/basic/atomics.wast
index e73d6b611..44786b31d 100644
--- a/test/lit/basic/atomics.wast
+++ b/test/lit/basic/atomics.wast
@@ -546,7 +546,7 @@
)
)
(drop
- (memory.atomic.wait64 align=8 offset=16
+ (memory.atomic.wait64 offset=16 align=8
(local.get $0)
(local.get $1)
(local.get $1)
diff --git a/test/lit/basic/atomics64.wast b/test/lit/basic/atomics64.wast
index 255ecc033..016515a91 100644
--- a/test/lit/basic/atomics64.wast
+++ b/test/lit/basic/atomics64.wast
@@ -558,7 +558,7 @@
)
)
(drop
- (memory.atomic.wait64 align=8 offset=16
+ (memory.atomic.wait64 offset=16 align=8
(local.get $0)
(local.get $1)
(local.get $1)
diff --git a/test/lit/basic/multi-table.wast b/test/lit/basic/multi-table.wast
index b856f8494..3a464dca1 100644
--- a/test/lit/basic/multi-table.wast
+++ b/test/lit/basic/multi-table.wast
@@ -83,7 +83,7 @@
;; table.
;; CHECK-TEXT: (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) (ref.func $f) (ref.func $h))
;; CHECK-BIN: (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) (ref.func $f) (ref.func $h))
- (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) $f $h)
+ (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) (ref.func $f) (ref.func $h))
;; CHECK-TEXT: (func $f (type $none_=>_none)
;; CHECK-TEXT-NEXT: (drop
diff --git a/test/lit/basic/reference-types.wast b/test/lit/basic/reference-types.wast
index 94d4f3525..75d5f313f 100644
--- a/test/lit/basic/reference-types.wast
+++ b/test/lit/basic/reference-types.wast
@@ -174,7 +174,7 @@
(import "env" "import_func" (func $import_func (param eqref) (result funcref)))
(import "env" "import_global" (global $import_global eqref))
- (export "export_func" (func $import_func (param eqref) (result funcref)))
+ (export "export_func" (func $import_func))
(export "export_global" (global $import_global))
;; Test global initializer expressions
diff --git a/test/lit/basic/simd.wast b/test/lit/basic/simd.wast
index 483caefca..af771e659 100644
--- a/test/lit/basic/simd.wast
+++ b/test/lit/basic/simd.wast
@@ -1738,7 +1738,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
(func $v128.load64_lane_align_offset (param $0 i32) (param $1 v128) (result v128)
- (v128.load64_lane align=1 offset=32 0
+ (v128.load64_lane offset=32 align=1 0
(local.get $0)
(local.get $1)
)
@@ -1871,7 +1871,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
(func $v128.store64_lane_align_offset (param $0 i32) (param $1 v128)
- (v128.store64_lane align=1 offset=32 0
+ (v128.store64_lane offset=32 align=1 0
(local.get $0)
(local.get $1)
)
diff --git a/test/lit/if-then-else.wast b/test/lit/if-then-else.wast
index 9d13cea92..7fa59fad0 100644
--- a/test/lit/if-then-else.wast
+++ b/test/lit/if-then-else.wast
@@ -30,14 +30,14 @@
;; CHECK-NEXT: )
(func $test (param i32) (result i32)
(if
- (local.get $0)
+ (local.get 0)
(then)
(else
(return (i32.const 0))
)
)
(if
- (local.get $0)
+ (local.get 0)
(then
(return
(i32.const 1)
diff --git a/test/lit/merge/renamings.wat b/test/lit/merge/renamings.wat
index bb49b7ab7..6d4de5c65 100644
--- a/test/lit/merge/renamings.wat
+++ b/test/lit/merge/renamings.wat
@@ -72,12 +72,12 @@
;; CHECK: (table $other 70 80 funcref)
;; CHECK: (elem $foo func $foo $bar)
- (elem $foo (ref null func) $foo $bar)
+ (elem $foo func $foo $bar)
;; This elem has a conflict in second.wat, and so second.wat's $bar
;; will be renamed.
;; CHECK: (elem $bar func $bar $foo)
- (elem $bar (ref null func) $bar $foo)
+ (elem $bar func $bar $foo)
;; CHECK: (elem $other func $foo_3 $other)
diff --git a/test/lit/merge/renamings.wat.second b/test/lit/merge/renamings.wat.second
index 5c3c5d299..f3489e620 100644
--- a/test/lit/merge/renamings.wat.second
+++ b/test/lit/merge/renamings.wat.second
@@ -20,9 +20,9 @@
(table $other 70 80 funcref)
- (elem $other (ref null func) $foo $other)
+ (elem $other func $foo $other)
- (elem $bar (ref null func) $other $foo)
+ (elem $bar func $other $foo)
(global $other i32 (i32.const 3))
diff --git a/test/lit/passes/Oz.wast b/test/lit/passes/Oz.wast
index 42295ec23..8c1db3083 100644
--- a/test/lit/passes/Oz.wast
+++ b/test/lit/passes/Oz.wast
@@ -48,7 +48,7 @@
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- (func $basics (export "localcse") (param $x i32) ($param $y i32) (result i32) ;; -O3 does localcse
+ (func $basics (export "localcse") (param $x i32) (param $y i32) (result i32) ;; -O3 does localcse
(local $x2 i32)
(local $y2 i32)
(local.set $x2
diff --git a/test/lit/passes/alignment-lowering.wast b/test/lit/passes/alignment-lowering.wast
index 0bcbbf3df..164229e07 100644
--- a/test/lit/passes/alignment-lowering.wast
+++ b/test/lit/passes/alignment-lowering.wast
@@ -982,7 +982,7 @@
(drop (i64.load align=1 (i32.const 12)))
(drop (i64.load align=2 (i32.const 16)))
(drop (i64.load align=4 (i32.const 20)))
- (drop (i64.load align=1 offset=3 (i32.const 20)))
+ (drop (i64.load offset=3 align=1 (i32.const 20)))
(drop (i64.load16_s align=1 (i32.const 28)))
(drop (i64.load32_s align=1 (i32.const 32)))
(drop (i64.load16_u align=1 (i32.const 40)))
@@ -1088,7 +1088,7 @@
(func $f32-load
(drop (f32.load align=1 (i32.const 12)))
(drop (f32.load align=2 (i32.const 16)))
- (drop (f32.load align=1 offset=3 (i32.const 20)))
+ (drop (f32.load offset=3 align=1 (i32.const 20)))
)
;; CHECK: (func $f64-load
;; CHECK-NEXT: (local $0 i32)
@@ -1344,7 +1344,7 @@
(drop (f64.load align=1 (i32.const 12)))
(drop (f64.load align=2 (i32.const 16)))
(drop (f64.load align=4 (i32.const 20)))
- (drop (f64.load align=1 offset=3 (i32.const 20)))
+ (drop (f64.load offset=3 align=1 (i32.const 20)))
)
;; CHECK: (func $i64-store
;; CHECK-NEXT: (local $0 i32)
@@ -1670,7 +1670,7 @@
(i64.store align=1 (i32.const 12) (i64.const 100))
(i64.store align=2 (i32.const 16) (i64.const 200))
(i64.store align=4 (i32.const 20) (i64.const 300))
- (i64.store align=1 offset=3 (i32.const 24) (i64.const 400))
+ (i64.store offset=3 align=1 (i32.const 24) (i64.const 400))
(i64.store16 align=1 (i32.const 20) (i64.const 600))
(i64.store32 align=1 (i32.const 20) (i64.const 700))
)
@@ -1776,7 +1776,7 @@
(func $f32-store
(f32.store align=1 (i32.const 12) (f32.const 100))
(f32.store align=2 (i32.const 16) (f32.const 200))
- (f32.store align=1 offset=3 (i32.const 24) (f32.const 400))
+ (f32.store offset=3 align=1 (i32.const 24) (f32.const 400))
)
;; CHECK: (func $f64-store
;; CHECK-NEXT: (local $0 i32)
@@ -2050,6 +2050,6 @@
(f64.store align=1 (i32.const 12) (f64.const 100))
(f64.store align=2 (i32.const 16) (f64.const 200))
(f64.store align=4 (i32.const 20) (f64.const 300))
- (f64.store align=1 offset=3 (i32.const 24) (f64.const 400))
+ (f64.store offset=3 align=1 (i32.const 24) (f64.const 400))
)
)
diff --git a/test/lit/passes/alignment-lowering64.wast b/test/lit/passes/alignment-lowering64.wast
index de4926911..1a4f05571 100644
--- a/test/lit/passes/alignment-lowering64.wast
+++ b/test/lit/passes/alignment-lowering64.wast
@@ -982,7 +982,7 @@
(drop (i64.load align=1 (i64.const 12)))
(drop (i64.load align=2 (i64.const 16)))
(drop (i64.load align=4 (i64.const 20)))
- (drop (i64.load align=1 offset=3 (i64.const 20)))
+ (drop (i64.load offset=3 align=1 (i64.const 20)))
(drop (i64.load16_s align=1 (i64.const 28)))
(drop (i64.load32_s align=1 (i64.const 32)))
(drop (i64.load16_u align=1 (i64.const 40)))
@@ -1088,7 +1088,7 @@
(func $f32-load
(drop (f32.load align=1 (i64.const 12)))
(drop (f32.load align=2 (i64.const 16)))
- (drop (f32.load align=1 offset=3 (i64.const 20)))
+ (drop (f32.load offset=3 align=1 (i64.const 20)))
)
;; CHECK: (func $f64-load
;; CHECK-NEXT: (local $0 i64)
@@ -1344,7 +1344,7 @@
(drop (f64.load align=1 (i64.const 12)))
(drop (f64.load align=2 (i64.const 16)))
(drop (f64.load align=4 (i64.const 20)))
- (drop (f64.load align=1 offset=3 (i64.const 20)))
+ (drop (f64.load offset=3 align=1 (i64.const 20)))
)
;; CHECK: (func $i64-store
;; CHECK-NEXT: (local $0 i64)
@@ -1670,7 +1670,7 @@
(i64.store align=1 (i64.const 12) (i64.const 100))
(i64.store align=2 (i64.const 16) (i64.const 200))
(i64.store align=4 (i64.const 20) (i64.const 300))
- (i64.store align=1 offset=3 (i64.const 24) (i64.const 400))
+ (i64.store offset=3 align=1 (i64.const 24) (i64.const 400))
(i64.store16 align=1 (i64.const 20) (i64.const 600))
(i64.store32 align=1 (i64.const 20) (i64.const 700))
)
@@ -1776,7 +1776,7 @@
(func $f32-store
(f32.store align=1 (i64.const 12) (f32.const 100))
(f32.store align=2 (i64.const 16) (f32.const 200))
- (f32.store align=1 offset=3 (i64.const 24) (f32.const 400))
+ (f32.store offset=3 align=1 (i64.const 24) (f32.const 400))
)
;; CHECK: (func $f64-store
;; CHECK-NEXT: (local $0 i64)
@@ -2050,6 +2050,6 @@
(f64.store align=1 (i64.const 12) (f64.const 100))
(f64.store align=2 (i64.const 16) (f64.const 200))
(f64.store align=4 (i64.const 20) (f64.const 300))
- (f64.store align=1 offset=3 (i64.const 24) (f64.const 400))
+ (f64.store offset=3 align=1 (i64.const 24) (f64.const 400))
)
)
diff --git a/test/lit/passes/coalesce-locals-learning.wast b/test/lit/passes/coalesce-locals-learning.wast
index aa20e87c5..5451c68cd 100644
--- a/test/lit/passes/coalesce-locals-learning.wast
+++ b/test/lit/passes/coalesce-locals-learning.wast
@@ -18,9 +18,8 @@
(type $3 (func (param i32 f32)))
;; CHECK: (type $4 (func (param i32)))
(type $4 (func (param i32)))
- (import $_emscripten_autodebug_i32 "env" "_emscripten_autodebug_i32" (param i32 i32) (result i32))
;; CHECK: (import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32)))
-
+ (import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32)))
;; CHECK: (memory $0 10)
;; CHECK: (func $nothing-to-do
diff --git a/test/lit/passes/coalesce-locals.wast b/test/lit/passes/coalesce-locals.wast
index 9666c02fa..38fefc17a 100644
--- a/test/lit/passes/coalesce-locals.wast
+++ b/test/lit/passes/coalesce-locals.wast
@@ -23,9 +23,6 @@
(type $2 (func))
(type $3 (func (param i32 f32)))
(type $4 (func (param i32)))
- (import $_emscripten_autodebug_i32 "env" "_emscripten_autodebug_i32" (param i32 i32) (result i32))
- (import $get "env" "get" (result i32))
- (import $set "env" "set" (param i32))
;; CHECK: (type $7 (func (param i32) (result i32)))
;; CHECK: (type $8 (func (param i32 i32)))
@@ -33,11 +30,11 @@
;; CHECK: (type $9 (func (result f64)))
;; CHECK: (import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32)))
-
+ (import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32)))
;; CHECK: (import "env" "get" (func $get (result i32)))
-
+ (import "env" "get" (func $get (result i32)))
;; CHECK: (import "env" "set" (func $set (param i32)))
-
+ (import "env" "set" (func $set (param i32)))
;; CHECK: (memory $0 10)
;; CHECK: (func $nothing-to-do
diff --git a/test/lit/passes/dae-gc-refine-return.wast b/test/lit/passes/dae-gc-refine-return.wast
index 11638b62f..f478c2ff3 100644
--- a/test/lit/passes/dae-gc-refine-return.wast
+++ b/test/lit/passes/dae-gc-refine-return.wast
@@ -541,7 +541,7 @@
(if
(local.get $y)
(then
- (return (struct.new ${i32_f32}))
+ (return (struct.new_default ${i32_f32}))
)
(else
(return (ref.null any))
@@ -549,7 +549,7 @@
)
)
(else
- (return (struct.new ${i32_i64}))
+ (return (struct.new_default ${i32_i64}))
)
)
)
@@ -570,12 +570,12 @@
;; Call $update-null so it gets optimized. (Call it with various values so
;; that other opts do not inline the constants.)
(drop
- ($call $update-null
+ (call $update-null
(i32.const 0)
(i32.const 1)
)
)
- ($call $update-null
+ (call $update-null
(i32.const 1)
(i32.const 0)
)
diff --git a/test/lit/passes/directize_all-features.wast b/test/lit/passes/directize_all-features.wast
index c560baf0e..706a86c46 100644
--- a/test/lit/passes/directize_all-features.wast
+++ b/test/lit/passes/directize_all-features.wast
@@ -1325,11 +1325,11 @@
;; CHECK: (elem $0 (table $has-set) (i32.const 1) func $foo)
;; IMMUT: (elem $0 (table $has-set) (i32.const 1) func $foo)
- (elem $0 (table $has-set) (i32.const 1) $foo)
+ (elem $0 (table $has-set) (i32.const 1) func $foo)
;; CHECK: (elem $1 (table $no-set) (i32.const 1) func $foo)
;; IMMUT: (elem $1 (table $no-set) (i32.const 1) func $foo)
- (elem $1 (table $no-set) (i32.const 1) $foo)
+ (elem $1 (table $no-set) (i32.const 1) func $foo)
;; CHECK: (func $foo (type $v)
;; CHECK-NEXT: (table.set $has-set
diff --git a/test/lit/passes/flatten_all-features.wast b/test/lit/passes/flatten_all-features.wast
index fd7332609..aa3dc7578 100644
--- a/test/lit/passes/flatten_all-features.wast
+++ b/test/lit/passes/flatten_all-features.wast
@@ -661,8 +661,8 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $a13 (result i32)
- (block $x i32
- (if i32
+ (block $x (result i32)
+ (if (result i32)
(br_table $x (i32.const 2) (i32.const 0))
(then
(i32.const 0)
@@ -702,7 +702,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $a14 (result i32)
- (block i32
+ (block (result i32)
(select
(i32.const 0) (i32.const 1) (br_table 0 (i32.const 7) (i32.const 1))
)
diff --git a/test/lit/passes/flatten_simplify-locals-nonesting_dfo_O3.wast b/test/lit/passes/flatten_simplify-locals-nonesting_dfo_O3.wast
index 4f1aa8ec3..142fabeea 100644
--- a/test/lit/passes/flatten_simplify-locals-nonesting_dfo_O3.wast
+++ b/test/lit/passes/flatten_simplify-locals-nonesting_dfo_O3.wast
@@ -84,7 +84,6 @@
)
(i32.const 15)
)
- (i64.const 1)
)
)
(else
@@ -182,4 +181,3 @@
(i32.const -2766)
)
)
-
diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast
index 6d997dfa5..6bf32e95b 100644
--- a/test/lit/passes/gufa-refs.wast
+++ b/test/lit/passes/gufa-refs.wast
@@ -4361,7 +4361,6 @@
(i32.const 22)
(f64.const 3.14159)
)
- (i32.const 11)
)
;; This write might alias both types now.
(struct.set $struct 0
@@ -4433,7 +4432,6 @@
(i32.const 10)
(f64.const 3.14159)
)
- (i32.const 10)
)
(struct.set $struct 0
(global.get $something)
diff --git a/test/lit/passes/instrument-memory.wast b/test/lit/passes/instrument-memory.wast
index 86053c51c..74b1e75d4 100644
--- a/test/lit/passes/instrument-memory.wast
+++ b/test/lit/passes/instrument-memory.wast
@@ -421,20 +421,20 @@
(drop (f32.load (i32.const 0)))
(drop (f64.load (i32.const 0)))
- (drop (i32.load8_s align=1 offset=1 (i32.const 0)))
- (drop (i32.load8_u align=1 offset=2 (i32.const 0)))
- (drop (i32.load16_s align=1 offset=3 (i32.const 0)))
- (drop (i32.load16_u align=1 offset=4 (i32.const 0)))
- (drop (i32.load align=2 offset=5 (i32.const 0)))
- (drop (i64.load8_s align=1 offset=6 (i32.const 0)))
- (drop (i64.load8_u align=1 offset=7 (i32.const 0)))
- (drop (i64.load16_s align=1 offset=8 (i32.const 0)))
- (drop (i64.load16_u align=1 offset=9 (i32.const 0)))
- (drop (i64.load32_s align=2 offset=10 (i32.const 0)))
- (drop (i64.load32_u align=2 offset=11 (i32.const 0)))
- (drop (i64.load align=2 offset=12 (i32.const 0)))
- (drop (f32.load align=2 offset=13 (i32.const 0)))
- (drop (f64.load align=2 offset=14 (i32.const 0)))
+ (drop (i32.load8_s offset=1 align=1 (i32.const 0)))
+ (drop (i32.load8_u offset=2 align=1 (i32.const 0)))
+ (drop (i32.load16_s offset=3 align=1 (i32.const 0)))
+ (drop (i32.load16_u offset=4 align=1 (i32.const 0)))
+ (drop (i32.load offset=5 align=2 (i32.const 0)))
+ (drop (i64.load8_s offset=6 align=1 (i32.const 0)))
+ (drop (i64.load8_u offset=7 align=1 (i32.const 0)))
+ (drop (i64.load16_s offset=8 align=1 (i32.const 0)))
+ (drop (i64.load16_u offset=9 align=1 (i32.const 0)))
+ (drop (i64.load32_s offset=10 align=2 (i32.const 0)))
+ (drop (i64.load32_u offset=11 align=2 (i32.const 0)))
+ (drop (i64.load offset=12 align=2 (i32.const 0)))
+ (drop (f32.load offset=13 align=2 (i32.const 0)))
+ (drop (f64.load offset=14 align=2 (i32.const 0)))
)
;; CHECK: (func $B
@@ -666,14 +666,14 @@
(f32.store (i32.const 0) (f32.const 8))
(f64.store (i32.const 0) (f64.const 9))
- (i32.store8 align=1 offset=1 (i32.const 0) (i32.const 1))
- (i32.store16 align=1 offset=2 (i32.const 0) (i32.const 2))
- (i32.store align=2 offset=3 (i32.const 0) (i32.const 3))
- (i64.store8 align=1 offset=4 (i32.const 0) (i64.const 4))
- (i64.store16 align=2 offset=5 (i32.const 0) (i64.const 5))
- (i64.store32 align=2 offset=6 (i32.const 0) (i64.const 6))
- (i64.store align=2 offset=7 (i32.const 0) (i64.const 7))
- (f32.store align=2 offset=8 (i32.const 0) (f32.const 8))
- (f64.store align=2 offset=9 (i32.const 0) (f64.const 9))
+ (i32.store8 offset=1 align=1 (i32.const 0) (i32.const 1))
+ (i32.store16 offset=2 align=1 (i32.const 0) (i32.const 2))
+ (i32.store offset=3 align=2 (i32.const 0) (i32.const 3))
+ (i64.store8 offset=4 align=1 (i32.const 0) (i64.const 4))
+ (i64.store16 offset=5 align=2 (i32.const 0) (i64.const 5))
+ (i64.store32 offset=6 align=2 (i32.const 0) (i64.const 6))
+ (i64.store offset=7 align=2 (i32.const 0) (i64.const 7))
+ (f32.store offset=8 align=2 (i32.const 0) (f32.const 8))
+ (f64.store offset=9 align=2 (i32.const 0) (f64.const 9))
)
)
diff --git a/test/lit/passes/instrument-memory64.wast b/test/lit/passes/instrument-memory64.wast
index 832777a45..1f3be75d5 100644
--- a/test/lit/passes/instrument-memory64.wast
+++ b/test/lit/passes/instrument-memory64.wast
@@ -421,20 +421,20 @@
(drop (f32.load (i64.const 0)))
(drop (f64.load (i64.const 0)))
- (drop (i32.load8_s align=1 offset=1 (i64.const 0)))
- (drop (i32.load8_u align=1 offset=2 (i64.const 0)))
- (drop (i32.load16_s align=1 offset=3 (i64.const 0)))
- (drop (i32.load16_u align=1 offset=4 (i64.const 0)))
- (drop (i32.load align=2 offset=5 (i64.const 0)))
- (drop (i64.load8_s align=1 offset=6 (i64.const 0)))
- (drop (i64.load8_u align=1 offset=7 (i64.const 0)))
- (drop (i64.load16_s align=1 offset=8 (i64.const 0)))
- (drop (i64.load16_u align=1 offset=9 (i64.const 0)))
- (drop (i64.load32_s align=2 offset=10 (i64.const 0)))
- (drop (i64.load32_u align=2 offset=11 (i64.const 0)))
- (drop (i64.load align=2 offset=12 (i64.const 0)))
- (drop (f32.load align=2 offset=13 (i64.const 0)))
- (drop (f64.load align=2 offset=14 (i64.const 0)))
+ (drop (i32.load8_s offset=1 align=1 (i64.const 0)))
+ (drop (i32.load8_u offset=2 align=1 (i64.const 0)))
+ (drop (i32.load16_s offset=3 align=1 (i64.const 0)))
+ (drop (i32.load16_u offset=4 align=1 (i64.const 0)))
+ (drop (i32.load offset=5 align=2 (i64.const 0)))
+ (drop (i64.load8_s offset=6 align=1 (i64.const 0)))
+ (drop (i64.load8_u offset=7 align=1 (i64.const 0)))
+ (drop (i64.load16_s offset=8 align=1 (i64.const 0)))
+ (drop (i64.load16_u offset=9 align=1 (i64.const 0)))
+ (drop (i64.load32_s offset=10 align=2 (i64.const 0)))
+ (drop (i64.load32_u offset=11 align=2 (i64.const 0)))
+ (drop (i64.load offset=12 align=2 (i64.const 0)))
+ (drop (f32.load offset=13 align=2 (i64.const 0)))
+ (drop (f64.load offset=14 align=2 (i64.const 0)))
)
;; CHECK: (func $B
@@ -666,14 +666,14 @@
(f32.store (i64.const 0) (f32.const 8))
(f64.store (i64.const 0) (f64.const 9))
- (i32.store8 align=1 offset=1 (i64.const 0) (i32.const 1))
- (i32.store16 align=1 offset=2 (i64.const 0) (i32.const 2))
- (i32.store align=2 offset=3 (i64.const 0) (i32.const 3))
- (i64.store8 align=1 offset=4 (i64.const 0) (i64.const 4))
- (i64.store16 align=2 offset=5 (i64.const 0) (i64.const 5))
- (i64.store32 align=2 offset=6 (i64.const 0) (i64.const 6))
- (i64.store align=2 offset=7 (i64.const 0) (i64.const 7))
- (f32.store align=2 offset=8 (i64.const 0) (f32.const 8))
- (f64.store align=2 offset=9 (i64.const 0) (f64.const 9))
+ (i32.store8 offset=1 align=1 (i64.const 0) (i32.const 1))
+ (i32.store16 offset=2 align=1 (i64.const 0) (i32.const 2))
+ (i32.store offset=3 align=2 (i64.const 0) (i32.const 3))
+ (i64.store8 offset=4 align=1 (i64.const 0) (i64.const 4))
+ (i64.store16 offset=5 align=2 (i64.const 0) (i64.const 5))
+ (i64.store32 offset=6 align=2 (i64.const 0) (i64.const 6))
+ (i64.store offset=7 align=2 (i64.const 0) (i64.const 7))
+ (f32.store offset=8 align=2 (i64.const 0) (f32.const 8))
+ (f64.store offset=9 align=2 (i64.const 0) (f64.const 9))
)
)
diff --git a/test/lit/passes/multi-memory-lowering.wast b/test/lit/passes/multi-memory-lowering.wast
index 7508a5627..9b7f53635 100644
--- a/test/lit/passes/multi-memory-lowering.wast
+++ b/test/lit/passes/multi-memory-lowering.wast
@@ -373,7 +373,7 @@
;; BOUNDS-NEXT: )
;; BOUNDS-NEXT: )
(func $v128.load16_lane (param $0 i32) (param $1 v128) (result v128)
- (v128.load16_lane $memory2 align=1 offset=32 0
+ (v128.load16_lane $memory2 offset=32 align=1 0
(local.get $0)
(local.get $1)
)
@@ -417,7 +417,7 @@
;; BOUNDS-NEXT: )
;; BOUNDS-NEXT: )
(func $v128.load32_zero (param $0 i32) (result v128)
- (v128.load32_zero $memory3 align=1 offset=16
+ (v128.load32_zero $memory3 offset=16 align=1
(local.get $0)
)
)
diff --git a/test/lit/passes/outlining.wast b/test/lit/passes/outlining.wast
index ee6dd5d90..6e298b5fd 100644
--- a/test/lit/passes/outlining.wast
+++ b/test/lit/passes/outlining.wast
@@ -731,12 +731,12 @@
;; Test outlining works with call_indirect
;; 0 results, 2 params, 3 operands
(module
- (table funcref)
+ (table 1 1 funcref)
;; CHECK: (type $0 (func))
;; CHECK: (type $1 (func (param i32 i32)))
- ;; CHECK: (table $0 0 funcref)
+ ;; CHECK: (table $0 1 1 funcref)
;; CHECK: (func $outline$ (type $0)
;; CHECK-NEXT: (call_indirect $0 (type $1)
@@ -769,10 +769,10 @@
;; Test outlining works with call_indirect
;; 0 results, 0 params, 1 operand
(module
- (table funcref)
+ (table 1 1 funcref)
;; CHECK: (type $0 (func))
- ;; CHECK: (table $0 0 funcref)
+ ;; CHECK: (table $0 1 1 funcref)
;; CHECK: (func $outline$ (type $0)
;; CHECK-NEXT: (call_indirect $0 (type $0)
@@ -797,12 +797,12 @@
;; Test outlining works with call_indirect
;; 1 result, 0 params, 1 operand
(module
- (table funcref)
+ (table 1 1 funcref)
;; CHECK: (type $0 (func))
;; CHECK: (type $1 (func (result i32)))
- ;; CHECK: (table $0 0 funcref)
+ ;; CHECK: (table $0 1 1 funcref)
;; CHECK: (func $outline$ (type $0)
;; CHECK-NEXT: (drop
@@ -835,12 +835,12 @@
;; Test outlining works with call_indirect
;; 2 results, 0 params, 1 operand
(module
- (table funcref)
+ (table 1 1 funcref)
;; CHECK: (type $0 (func))
;; CHECK: (type $1 (func (result i32 i32)))
- ;; CHECK: (table $0 0 funcref)
+ ;; CHECK: (table $0 1 1 funcref)
;; CHECK: (func $outline$ (type $0)
;; CHECK-NEXT: (tuple.drop 2
diff --git a/test/lit/passes/poppify.wast b/test/lit/passes/poppify.wast
index 93a0353e3..b8323b717 100644
--- a/test/lit/passes/poppify.wast
+++ b/test/lit/passes/poppify.wast
@@ -64,7 +64,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
(func $block (result i32)
- (block i32
+ (block (result i32)
(nop)
(i32.const 0)
)
@@ -80,9 +80,9 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $nested (result i32)
- (block $block i32
- (block $block0 i32
- (block $block1 i32
+ (block $block (result i32)
+ (block $block0 (result i32)
+ (block $block1 (result i32)
(i32.const 0)
)
)
@@ -93,9 +93,9 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
(func $nested-nonames (result i32)
- (block i32
- (block i32
- (block i32
+ (block (result i32)
+ (block (result i32)
+ (block (result i32)
(i32.const 0)
)
)
@@ -160,7 +160,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $block-br (result i32)
- (block $l i32
+ (block $l (result i32)
(nop)
(br $l
(i32.const 0)
@@ -211,7 +211,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $if-else (result i32)
- (if i32
+ (if (result i32)
(i32.const 0)
(then
(i32.const 1)
@@ -238,7 +238,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $try-catch (result i32)
- (try i32
+ (try (result i32)
(do
(throw $e
(i32.const 0)
@@ -272,7 +272,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $try-delegate (result i32)
- (try $l0 i32
+ (try $l0 (result i32)
(do
(try
(do
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 c964d8c28..23f018787 100644
--- a/test/lit/passes/remove-unused-module-elements_all-features.wast
+++ b/test/lit/passes/remove-unused-module-elements_all-features.wast
@@ -35,9 +35,9 @@
(type $2-dupe (func (param i32) (result i32)))
(type $2-thrupe (func (param i32) (result i32)))
(export "memory" (memory $0))
- (export "exported" $exported)
- (export "other1" $other1)
- (export "other2" $other2)
+ (export "exported" (func $exported))
+ (export "other1" (func $other1))
+ (export "other2" (func $other2))
(table 1 1 funcref)
(elem (i32.const 0) $called_indirect)
;; CHECK: (func $start (type $0)
@@ -237,11 +237,10 @@
;; CHECK: (import "env" "memory" (memory $0 256))
(import "env" "memory" (memory $0 256))
(import "env" "table" (table 0 funcref))
- (export "user" $user)
;; CHECK: (import "env" "table" (table $timport$0 0 funcref))
;; CHECK: (export "user" (func $user))
-
+ (export "user" (func $user))
;; CHECK: (func $user (type $0)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.load
@@ -262,9 +261,8 @@
;; CHECK: (memory $0 23 256 shared)
(memory $0 23 256 shared)
- (export "user" $user)
;; CHECK: (export "user" (func $user))
-
+ (export "user" (func $user))
;; CHECK: (func $user (type $0)
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (i32.const 0)
@@ -280,9 +278,8 @@
;; CHECK: (memory $0 23 256 shared)
(memory $0 23 256 shared)
- (export "user" $user)
;; CHECK: (export "user" (func $user))
-
+ (export "user" (func $user))
;; CHECK: (func $user (type $0) (result i32)
;; CHECK-NEXT: (i32.atomic.rmw.add
;; CHECK-NEXT: (i32.const 0)
@@ -298,9 +295,8 @@
;; CHECK: (memory $0 23 256 shared)
(memory $0 23 256 shared)
- (export "user" $user)
;; CHECK: (export "user" (func $user))
-
+ (export "user" (func $user))
;; CHECK: (func $user (type $0) (result i32)
;; CHECK-NEXT: (i32.atomic.rmw8.cmpxchg_u
;; CHECK-NEXT: (i32.const 0)
@@ -317,9 +313,8 @@
;; CHECK: (memory $0 23 256 shared)
(memory $0 23 256 shared)
- (export "user" $user)
;; CHECK: (export "user" (func $user))
-
+ (export "user" (func $user))
;; CHECK: (func $user (type $0)
;; CHECK-NEXT: (local $0 i32)
;; CHECK-NEXT: (local $1 i64)
@@ -348,9 +343,8 @@
;; CHECK: (memory $0 23 256 shared)
(memory $0 23 256 shared)
- (export "user" $user)
;; CHECK: (export "user" (func $user))
-
+ (export "user" (func $user))
;; CHECK: (func $user (type $0) (result i32)
;; CHECK-NEXT: (memory.atomic.notify
;; CHECK-NEXT: (i32.const 0)
@@ -364,13 +358,12 @@
(module ;; atomic.fence and data.drop do not use a memory, so should not keep the memory alive.
(memory $0 1 1 shared)
(data "")
- (export "fake-user" $user)
;; CHECK: (type $0 (func))
;; CHECK: (data $0 "")
;; CHECK: (export "fake-user" (func $user))
-
+ (export "fake-user" (func $user))
;; CHECK: (func $user (type $0)
;; CHECK-NEXT: (atomic.fence)
;; CHECK-NEXT: (data.drop $0)
@@ -389,9 +382,8 @@
(memory $1 23 256)
(memory $unused 1 1)
- (export "user" $user)
;; CHECK: (export "user" (func $user))
-
+ (export "user" (func $user))
;; CHECK: (func $user (type $0)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (memory.grow $0
@@ -414,9 +406,8 @@
;; CHECK: (memory $0 23 256)
(memory $0 23 256)
- (export "user" $user)
;; CHECK: (export "user" (func $user))
-
+ (export "user" (func $user))
;; CHECK: (func $user (type $0) (result i32)
;; CHECK-NEXT: (memory.size)
;; CHECK-NEXT: )
@@ -432,9 +423,8 @@
;; CHECK: (memory $1 1 1)
(memory $1 1 1)
(memory $unused 1 1)
- (export "user" $user)
;; CHECK: (export "user" (func $user))
-
+ (export "user" (func $user))
;; CHECK: (func $user (type $0)
;; CHECK-NEXT: (memory.copy $0 $1
;; CHECK-NEXT: (i32.const 0)
@@ -620,17 +610,17 @@
(table $defined-used 6 6 funcref)
;; CHECK: (elem $active1 (table $written) (i32.const 0) func $0)
- (elem $active1 (table $written) (i32.const 0) $0)
+ (elem $active1 (table $written) (i32.const 0) func $0)
;; This empty active segment doesn't keep the unwritten table alive.
- (elem $active2 (table $unwritten) (i32.const 0))
+ (elem $active2 (table $unwritten) (i32.const 0) func)
- (elem $active3 (table $defined-unused) (i32.const 0) $0)
+ (elem $active3 (table $defined-unused) (i32.const 0) func $0)
;; CHECK: (elem $active4 (table $defined-used) (i32.const 0) func $0)
- (elem $active4 (table $defined-used) (i32.const 0) $0)
+ (elem $active4 (table $defined-used) (i32.const 0) func $0)
- (elem $active5 (table $defined-used) (i32.const 0))
+ (elem $active5 (table $defined-used) (i32.const 0) func)
;; CHECK: (func $0 (type $0) (param $var$0 f64) (result f64)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (table.get $defined-used
@@ -748,7 +738,6 @@
(array.new_elem $array 1
(i32.const 0)
(i32.const 0)
- (i32.const 0)
)
)
)
diff --git a/test/lit/passes/stack-check-memory64.wast b/test/lit/passes/stack-check-memory64.wast
index 137b156de..807e733e7 100644
--- a/test/lit/passes/stack-check-memory64.wast
+++ b/test/lit/passes/stack-check-memory64.wast
@@ -4,7 +4,7 @@
;; RUN: foreach %s %t wasm-opt --stack-check --enable-memory64 -S -o - | filecheck %s
(module
- (memory i64 (data))
+ (memory i64 0 0)
;; CHECK: (type $0 (func (result i64)))
;; CHECK: (type $1 (func (param i64 i64)))
@@ -15,9 +15,7 @@
;; CHECK: (global $__stack_limit (mut i64) (i64.const 0))
- ;; CHECK: (memory $0 i64 0 65536)
-
- ;; CHECK: (data $0 (i64.const 0) "")
+ ;; CHECK: (memory $0 i64 0 0)
;; CHECK: (export "use_stack" (func $use_stack))
@@ -64,7 +62,7 @@
;; CHECK-NEXT: )
(module
;; if the global names are taken we should not crash
- (memory i64 (data))
+ (memory i64 0 0)
;; CHECK: (type $0 (func (result i64)))
;; CHECK: (type $1 (func (param i64 i64)))
@@ -79,9 +77,7 @@
;; CHECK: (global $__stack_limit_3 (mut i64) (i64.const 0))
- ;; CHECK: (memory $0 i64 0 65536)
-
- ;; CHECK: (data $0 (i64.const 0) "")
+ ;; CHECK: (memory $0 i64 0 0)
;; CHECK: (export "use_stack" (func $0))
(export "use_stack" (func $0))
diff --git a/test/lit/passes/stack-ir-non-nullable.wast b/test/lit/passes/stack-ir-non-nullable.wast
index 62d75d61f..99bad9423 100644
--- a/test/lit/passes/stack-ir-non-nullable.wast
+++ b/test/lit/passes/stack-ir-non-nullable.wast
@@ -535,7 +535,6 @@
(if
(i32.eqz
(local.get $temp)
- (i32.const 0)
)
(then
(local.set $temp
diff --git a/test/lit/passes/unsubtyping-casts.wast b/test/lit/passes/unsubtyping-casts.wast
index 8019efcd8..c1993e8b4 100644
--- a/test/lit/passes/unsubtyping-casts.wast
+++ b/test/lit/passes/unsubtyping-casts.wast
@@ -424,21 +424,21 @@
(local $l (ref null $topA))
(local.set $l
;; Require $botA <: $topA.
- (struct.new $botA)
+ (struct.new_default $botA)
)
(drop
;; Now the cast requires $midA <: $topA so that a $botA value appearing in
;; the $topA location would still pass the cast to $midA. This will
;; transitively require $botB <: $topB.
(ref.cast (ref $midA)
- (struct.new $topA)
+ (struct.new_default $topA)
)
)
(drop
;; Same as before, but now for the B types. This requires $botC <: $topC, but
;; only after the previous cast has already been analyzed.
(ref.cast (ref $midB)
- (struct.new $topB)
+ (struct.new_default $topB)
)
)
(drop
diff --git a/test/lit/passes/unsubtyping.wast b/test/lit/passes/unsubtyping.wast
index 38549504e..ad74ab736 100644
--- a/test/lit/passes/unsubtyping.wast
+++ b/test/lit/passes/unsubtyping.wast
@@ -468,8 +468,8 @@
;; CHECK: (type $2 (func (param (ref $super))))
- ;; CHECK: (table $t 0 funcref)
- (table $t funcref)
+ ;; CHECK: (table $t 1 1 funcref)
+ (table $t 1 1 funcref)
;; CHECK: (func $call-indirect (type $2) (param $0 (ref $super))
;; CHECK-NEXT: (call_indirect $t (type $2)
@@ -497,8 +497,8 @@
;; CHECK: (type $3 (func (result (ref $super))))
- ;; CHECK: (table $t 0 funcref)
- (table $t funcref)
+ ;; CHECK: (table $t 1 1 funcref)
+ (table $t 1 1 funcref)
;; CHECK: (func $return-call-indirect (type $3) (result (ref $super))
;; CHECK-NEXT: (return_call_indirect $t (type $2)
@@ -521,8 +521,8 @@
(type $super (sub (func)))
(type $sub (sub $super (func)))
- ;; CHECK: (table $t 0 (ref null $super))
- (table $t (ref null $super) 1 1)
+ ;; CHECK: (table $t 1 1 (ref null $super))
+ (table $t 1 1 (ref null $super))
;; CHECK: (func $call-indirect-table (type $sub)
;; CHECK-NEXT: (call_indirect $t (type $sub)
@@ -739,8 +739,8 @@
;; CHECK: (type $2 (func))
- ;; CHECK: (table $t 0 (ref null $super))
- (table $t (ref null $super) 1 1)
+ ;; CHECK: (table $t 1 1 (ref null $super))
+ (table $t 1 1 (ref null $super))
;; CHECK: (func $table-set (type $2)
;; CHECK-NEXT: (table.set $t
@@ -766,8 +766,8 @@
;; CHECK: (type $2 (func))
- ;; CHECK: (table $t 0 (ref null $super))
- (table $t (ref null $super) 1 1)
+ ;; CHECK: (table $t 1 1 (ref null $super))
+ (table $t 1 1 (ref null $super))
;; CHECK: (func $table-fill (type $2)
;; CHECK-NEXT: (table.fill $t
@@ -795,11 +795,11 @@
;; CHECK: (type $sub (sub $super (struct )))
(type $sub (sub $super (struct)))
- ;; CHECK: (table $super 0 (ref null $super))
- (table $super (ref null $super) 1 1)
+ ;; CHECK: (table $super 1 1 (ref null $super))
+ (table $super 1 1 (ref null $super))
- ;; CHECK: (table $sub 0 (ref null $sub))
- (table $sub (ref null $sub) 1 1)
+ ;; CHECK: (table $sub 1 1 (ref null $sub))
+ (table $sub 1 1 (ref null $sub))
;; CHECK: (func $table-copy (type $0)
;; CHECK-NEXT: (table.copy $super $sub
diff --git a/test/lit/passes/vacuum_all-features.wast b/test/lit/passes/vacuum_all-features.wast
index e4b183663..5dbbb9386 100644
--- a/test/lit/passes/vacuum_all-features.wast
+++ b/test/lit/passes/vacuum_all-features.wast
@@ -16,13 +16,12 @@
(type $3 (func (result i32)))
;; CHECK: (type $4 (func (param i32 f64 i32 i32)))
(type $4 (func (param i32 f64 i32 i32)))
- (import $int "env" "int" (result i32))
;; CHECK: (type $5 (func (param i32) (result i32)))
;; CHECK: (type $6 (func (result f64)))
;; CHECK: (import "env" "int" (func $int (type $3) (result i32)))
-
+ (import "env" "int" (func $int (result i32)))
;; CHECK: (global $Int i32 (i32.const 0))
(global $Int i32 (i32.const 0))
;; CHECK: (memory $0 256 256)
@@ -1148,7 +1147,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $_deflate (param i32) (result i32)
- (call $_deflate (local.get $0))
+ (call $_deflate (local.get 0))
)
;; CHECK: (func $_deflateInit2_ (type $0) (param $0 i32) (result i32)
;; CHECK-NEXT: (call $_deflateInit2_
@@ -1156,7 +1155,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $_deflateInit2_ (param i32) (result i32)
- (call $_deflateInit2_ (local.get $0))
+ (call $_deflateInit2_ (local.get 0))
)
;; CHECK: (func $_deflateEnd (type $0) (param $0 i32) (result i32)
;; CHECK-NEXT: (call $_deflateEnd
@@ -1164,7 +1163,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $_deflateEnd (param i32) (result i32)
- (call $_deflateEnd (local.get $0))
+ (call $_deflateEnd (local.get 0))
)
;; CHECK: (func $compress (type $1) (param $0 i32) (param $1 i32) (param $2 i32)
;; CHECK-NEXT: (local $3 i32)