summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/emcc_O2_hello_world.fromasm114
-rw-r--r--test/emcc_O2_hello_world.fromasm.imprecise114
-rw-r--r--test/emcc_hello_world.fromasm16
-rw-r--r--test/emcc_hello_world.fromasm.imprecise16
-rw-r--r--test/example/c-api-kitchen-sink.txt95
-rw-r--r--test/memorygrowth.fromasm2
-rw-r--r--test/memorygrowth.fromasm.imprecise2
-rw-r--r--test/min.fromasm12
-rw-r--r--test/min.fromasm.imprecise12
-rw-r--r--test/passes/vacuum.txt72
-rw-r--r--test/passes/vacuum.wast54
-rw-r--r--test/unit.fromasm111
-rw-r--r--test/unit.fromasm.imprecise112
13 files changed, 230 insertions, 502 deletions
diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm
index d132a15c2..838184cf4 100644
--- a/test/emcc_O2_hello_world.fromasm
+++ b/test/emcc_O2_hello_world.fromasm
@@ -1905,7 +1905,6 @@
(set_local $30
(get_local $6)
)
- (i32.const 90)
(br $while-in$20)
)
)
@@ -1922,7 +1921,6 @@
(set_local $30
(get_local $6)
)
- (i32.const 90)
)
(block
(set_local $7
@@ -3112,23 +3110,14 @@
)
(i32.const 0)
)
- (i32.or
- (i32.le_u
- (set_local $14
- (i32.add
- (set_local $26
- (i32.load
- (i32.const 608)
- )
- )
- (get_local $7)
+ (set_local $14
+ (i32.add
+ (set_local $26
+ (i32.load
+ (i32.const 608)
)
)
- (get_local $26)
- )
- (i32.gt_u
- (get_local $14)
- (get_local $9)
+ (get_local $7)
)
)
(i32.const 0)
@@ -3170,19 +3159,13 @@
)
(get_local $9)
)
- (i32.gt_u
- (i32.add
- (get_local $26)
- (i32.load
- (set_local $11
- (i32.add
- (get_local $14)
- (i32.const 4)
- )
- )
+ (i32.load
+ (set_local $11
+ (i32.add
+ (get_local $14)
+ (i32.const 4)
)
)
- (get_local $9)
)
(i32.const 0)
)
@@ -3287,13 +3270,10 @@
(get_local $8)
(i32.const 173)
)
- (i32.ne
- (set_local $9
- (call_import $_sbrk
- (i32.const 0)
- )
+ (set_local $9
+ (call_import $_sbrk
+ (i32.const 0)
)
- (i32.const -1)
)
(i32.const 0)
)
@@ -3569,16 +3549,10 @@
)
(i32.const 0)
)
- (i32.gt_u
- (set_local $13
- (i32.sub
- (get_local $7)
- (get_local $3)
- )
- )
- (i32.add
- (get_local $0)
- (i32.const 40)
+ (set_local $13
+ (i32.sub
+ (get_local $7)
+ (get_local $3)
)
)
(i32.const 0)
@@ -5067,16 +5041,13 @@
)
(get_local $13)
)
- (i32.gt_u
- (set_local $16
- (i32.add
- (get_local $3)
- (i32.load offset=4
- (get_local $28)
- )
+ (set_local $16
+ (i32.add
+ (get_local $3)
+ (i32.load offset=4
+ (get_local $28)
)
)
- (get_local $13)
)
(i32.const 0)
)
@@ -8854,15 +8825,10 @@
)
(get_local $7)
)
- (i32.ne
- (set_local $10
- (i32.and
- (get_local $1)
- (i32.const 255)
- )
- )
- (i32.load8_s offset=75
- (get_local $0)
+ (set_local $10
+ (i32.and
+ (get_local $1)
+ (i32.const 255)
)
)
(i32.const 0)
@@ -9361,20 +9327,15 @@
)
(i32.const 10)
)
- (i32.lt_u
- (set_local $2
- (i32.load
- (set_local $4
- (i32.add
- (get_local $1)
- (i32.const 20)
- )
+ (set_local $2
+ (i32.load
+ (set_local $4
+ (i32.add
+ (get_local $1)
+ (i32.const 20)
)
)
)
- (i32.load offset=16
- (get_local $1)
- )
)
(i32.const 0)
)
@@ -9686,12 +9647,9 @@
(i32.const 12)
)
)
- (i32.ne
- (call_import $___syscall54
- (i32.const 54)
- (get_local $3)
- )
- (i32.const 0)
+ (call_import $___syscall54
+ (i32.const 54)
+ (get_local $3)
)
)
(i32.const 0)
diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise
index d132a15c2..838184cf4 100644
--- a/test/emcc_O2_hello_world.fromasm.imprecise
+++ b/test/emcc_O2_hello_world.fromasm.imprecise
@@ -1905,7 +1905,6 @@
(set_local $30
(get_local $6)
)
- (i32.const 90)
(br $while-in$20)
)
)
@@ -1922,7 +1921,6 @@
(set_local $30
(get_local $6)
)
- (i32.const 90)
)
(block
(set_local $7
@@ -3112,23 +3110,14 @@
)
(i32.const 0)
)
- (i32.or
- (i32.le_u
- (set_local $14
- (i32.add
- (set_local $26
- (i32.load
- (i32.const 608)
- )
- )
- (get_local $7)
+ (set_local $14
+ (i32.add
+ (set_local $26
+ (i32.load
+ (i32.const 608)
)
)
- (get_local $26)
- )
- (i32.gt_u
- (get_local $14)
- (get_local $9)
+ (get_local $7)
)
)
(i32.const 0)
@@ -3170,19 +3159,13 @@
)
(get_local $9)
)
- (i32.gt_u
- (i32.add
- (get_local $26)
- (i32.load
- (set_local $11
- (i32.add
- (get_local $14)
- (i32.const 4)
- )
- )
+ (i32.load
+ (set_local $11
+ (i32.add
+ (get_local $14)
+ (i32.const 4)
)
)
- (get_local $9)
)
(i32.const 0)
)
@@ -3287,13 +3270,10 @@
(get_local $8)
(i32.const 173)
)
- (i32.ne
- (set_local $9
- (call_import $_sbrk
- (i32.const 0)
- )
+ (set_local $9
+ (call_import $_sbrk
+ (i32.const 0)
)
- (i32.const -1)
)
(i32.const 0)
)
@@ -3569,16 +3549,10 @@
)
(i32.const 0)
)
- (i32.gt_u
- (set_local $13
- (i32.sub
- (get_local $7)
- (get_local $3)
- )
- )
- (i32.add
- (get_local $0)
- (i32.const 40)
+ (set_local $13
+ (i32.sub
+ (get_local $7)
+ (get_local $3)
)
)
(i32.const 0)
@@ -5067,16 +5041,13 @@
)
(get_local $13)
)
- (i32.gt_u
- (set_local $16
- (i32.add
- (get_local $3)
- (i32.load offset=4
- (get_local $28)
- )
+ (set_local $16
+ (i32.add
+ (get_local $3)
+ (i32.load offset=4
+ (get_local $28)
)
)
- (get_local $13)
)
(i32.const 0)
)
@@ -8854,15 +8825,10 @@
)
(get_local $7)
)
- (i32.ne
- (set_local $10
- (i32.and
- (get_local $1)
- (i32.const 255)
- )
- )
- (i32.load8_s offset=75
- (get_local $0)
+ (set_local $10
+ (i32.and
+ (get_local $1)
+ (i32.const 255)
)
)
(i32.const 0)
@@ -9361,20 +9327,15 @@
)
(i32.const 10)
)
- (i32.lt_u
- (set_local $2
- (i32.load
- (set_local $4
- (i32.add
- (get_local $1)
- (i32.const 20)
- )
+ (set_local $2
+ (i32.load
+ (set_local $4
+ (i32.add
+ (get_local $1)
+ (i32.const 20)
)
)
)
- (i32.load offset=16
- (get_local $1)
- )
)
(i32.const 0)
)
@@ -9686,12 +9647,9 @@
(i32.const 12)
)
)
- (i32.ne
- (call_import $___syscall54
- (i32.const 54)
- (get_local $3)
- )
- (i32.const 0)
+ (call_import $___syscall54
+ (i32.const 54)
+ (get_local $3)
)
)
(i32.const 0)
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm
index e6dc0b659..8cdbf91fd 100644
--- a/test/emcc_hello_world.fromasm
+++ b/test/emcc_hello_world.fromasm
@@ -272,7 +272,6 @@
)
(call_import $abort)
)
- (i32.const 0)
(call $_printf
(i32.const 672)
(get_local $0)
@@ -506,7 +505,6 @@
(i32.const 5)
)
(loop $while-out$2 $while-in$3
- (i32.const 0)
(set_local $1
(get_local $3)
)
@@ -565,7 +563,6 @@
(set_local $3
(get_local $1)
)
- (i32.const 5)
)
)
(br $while-in$3)
@@ -1035,9 +1032,7 @@
(i32.const 0)
)
(func $___unlockfile (param $0 i32)
- (i32.load
- (i32.const 8)
- )
+ (nop)
)
(func $___stdio_write (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
@@ -3360,7 +3355,6 @@
(set_local $70
(get_local $5)
)
- (i32.const 9)
)
(block
(set_local $41
@@ -8113,7 +8107,6 @@
(i32.const 64)
)
(block
- (i32.const 0)
(set_local $7
(i32.and
(get_local $69)
@@ -8300,7 +8293,6 @@
(i32.const 76)
)
(block
- (i32.const 0)
(set_local $34
(call $_fmt_u
(get_local $45)
@@ -11902,7 +11894,6 @@
(set_local $31
(get_local $6)
)
- (i32.const 90)
(br $while-in$20)
)
)
@@ -11934,7 +11925,6 @@
(set_local $31
(get_local $6)
)
- (i32.const 90)
)
)
(br $while-in$20)
@@ -18082,10 +18072,6 @@
(nop)
)
(func $_i64Subtract (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
- (i32.sub
- (get_local $1)
- (get_local $3)
- )
(i32.store
(i32.const 168)
(i32.sub
diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise
index 1af75ec39..ef9e9bba0 100644
--- a/test/emcc_hello_world.fromasm.imprecise
+++ b/test/emcc_hello_world.fromasm.imprecise
@@ -270,7 +270,6 @@
)
(call_import $abort)
)
- (i32.const 0)
(call $_printf
(i32.const 672)
(get_local $0)
@@ -504,7 +503,6 @@
(i32.const 5)
)
(loop $while-out$2 $while-in$3
- (i32.const 0)
(set_local $1
(get_local $3)
)
@@ -563,7 +561,6 @@
(set_local $3
(get_local $1)
)
- (i32.const 5)
)
)
(br $while-in$3)
@@ -1033,9 +1030,7 @@
(i32.const 0)
)
(func $___unlockfile (param $0 i32)
- (i32.load
- (i32.const 8)
- )
+ (nop)
)
(func $___stdio_write (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
@@ -3358,7 +3353,6 @@
(set_local $70
(get_local $5)
)
- (i32.const 9)
)
(block
(set_local $41
@@ -8111,7 +8105,6 @@
(i32.const 64)
)
(block
- (i32.const 0)
(set_local $7
(i32.and
(get_local $69)
@@ -8298,7 +8291,6 @@
(i32.const 76)
)
(block
- (i32.const 0)
(set_local $34
(call $_fmt_u
(get_local $45)
@@ -11900,7 +11892,6 @@
(set_local $31
(get_local $6)
)
- (i32.const 90)
(br $while-in$20)
)
)
@@ -11932,7 +11923,6 @@
(set_local $31
(get_local $6)
)
- (i32.const 90)
)
)
(br $while-in$20)
@@ -18080,10 +18070,6 @@
(nop)
)
(func $_i64Subtract (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
- (i32.sub
- (get_local $1)
- (get_local $3)
- )
(i32.store
(i32.const 168)
(i32.sub
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index c4fb6a4af..118e0c982 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -633,113 +633,57 @@ optimized:
(memory 0)
(type $v (func))
(func $just-one-block (type $v)
- (i32.const 1337)
+ (nop)
)
(func $two-blocks (type $v)
- (i32.const 0)
- (i32.const 1)
+ (nop)
)
(func $two-blocks-plus-code (type $v)
- (i32.const 0)
- (i32.const 77)
- (i32.const 1)
+ (nop)
)
(func $loop (type $v)
(loop $shape$0$break $shape$0$continue
- (i32.const 0)
- (i32.const 1)
(br $shape$0$continue)
)
)
(func $loop-plus-code (type $v)
(loop $shape$0$break $shape$0$continue
- (i32.const 0)
- (i32.const 33)
- (i32.const 1)
- (i32.const -66)
(br $shape$0$continue)
)
)
(func $split (type $v)
- (i32.const 0)
- (select
- (i32.const 1)
- (i32.const 2)
- (i32.const 55)
- )
+ (nop)
)
(func $split-plus-code (type $v)
- (i32.const 0)
- (select
- (block
- (i32.const 10)
- (i32.const 1)
- )
- (block
- (i32.const 20)
- (i32.const 2)
- )
- (i32.const 55)
- )
+ (nop)
)
(func $if (type $v)
- (i32.const 0)
- (if
- (i32.const 55)
- (i32.const 1)
- )
- (i32.const 2)
+ (nop)
)
(func $if-plus-code (type $v)
- (i32.const 0)
- (select
- (block
- (i32.const -1)
- (i32.const 1)
- (i32.const -3)
- )
- (i32.const -2)
- (i32.const 55)
- )
- (i32.const 2)
+ (nop)
)
(func $if-else (type $v)
- (i32.const 0)
- (select
- (i32.const 1)
- (i32.const 2)
- (i32.const 55)
- )
- (i32.const 3)
+ (nop)
)
(func $loop-tail (type $v)
(loop $shape$0$break $shape$0$continue
- (i32.const 0)
- (i32.const 1)
(if
(i32.const 10)
(br $shape$0$continue)
(br $shape$0$break)
)
)
- (i32.const 2)
)
(func $nontrivial-loop-plus-phi-to-head (type $v)
(local $0 i32)
- (i32.const 0)
- (i32.const 10)
(loop $shape$1$break $shape$1$continue
- (i32.const 1)
(if
(i32.eqz
(i32.const -2)
)
- (block
- (i32.const 20)
- (br $shape$1$break)
- )
+ (br $shape$1$break)
)
- (i32.const 2)
(if
(i32.const -6)
(block
@@ -748,28 +692,9 @@ optimized:
)
(br $shape$1$break)
)
- (block
- (i32.const 30)
- (br $shape$1$continue)
- )
- )
- )
- (if
- (i32.eq
- (get_local $0)
- (i32.const 4)
- )
- (block
- (i32.const 3)
- (if
- (i32.const -10)
- (i32.const 4)
- )
- (i32.const 5)
- (i32.const 40)
+ (br $shape$1$continue)
)
)
- (i32.const 6)
)
)
module loaded from binary form:
diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm
index 6ba8ef07a..9e2b77330 100644
--- a/test/memorygrowth.fromasm
+++ b/test/memorygrowth.fromasm
@@ -1945,7 +1945,6 @@
(set_local $32
(get_local $1)
)
- (i32.const 90)
(br $while-in$20)
)
)
@@ -1962,7 +1961,6 @@
(set_local $32
(get_local $1)
)
- (i32.const 90)
)
(block
(set_local $16
diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise
index 6ba8ef07a..9e2b77330 100644
--- a/test/memorygrowth.fromasm.imprecise
+++ b/test/memorygrowth.fromasm.imprecise
@@ -1945,7 +1945,6 @@
(set_local $32
(get_local $1)
)
- (i32.const 90)
(br $while-in$20)
)
)
@@ -1962,7 +1961,6 @@
(set_local $32
(get_local $1)
)
- (i32.const 90)
)
(block
(set_local $16
diff --git a/test/min.fromasm b/test/min.fromasm
index 596ed06cf..45b2f8c19 100644
--- a/test/min.fromasm
+++ b/test/min.fromasm
@@ -23,17 +23,7 @@
)
)
(func $bitcasts (param $0 i32) (param $1 f32)
- (f32.reinterpret/i32
- (get_local $0)
- )
- (f64.promote/f32
- (f32.reinterpret/i32
- (get_local $0)
- )
- )
- (i32.reinterpret/f32
- (get_local $1)
- )
+ (nop)
)
(func $ctzzzz (result i32)
(i32.ctz
diff --git a/test/min.fromasm.imprecise b/test/min.fromasm.imprecise
index 596ed06cf..45b2f8c19 100644
--- a/test/min.fromasm.imprecise
+++ b/test/min.fromasm.imprecise
@@ -23,17 +23,7 @@
)
)
(func $bitcasts (param $0 i32) (param $1 f32)
- (f32.reinterpret/i32
- (get_local $0)
- )
- (f64.promote/f32
- (f32.reinterpret/i32
- (get_local $0)
- )
- )
- (i32.reinterpret/f32
- (get_local $1)
- )
+ (nop)
)
(func $ctzzzz (result i32)
(i32.ctz
diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt
index 69cf5301c..cfe2766c8 100644
--- a/test/passes/vacuum.txt
+++ b/test/passes/vacuum.txt
@@ -1,11 +1,7 @@
(module
(memory 256 256)
(func $b
- (i32.const 50)
- (i32.const 51)
- (i32.const 52)
(block $waka1
- (i32.const 53)
(br $waka1)
)
(block $waka2
@@ -26,7 +22,6 @@
(i32.const 102)
(i32.const 103)
)
- (i32.const 104)
)
(func $l
(local $x i32)
@@ -49,4 +44,71 @@
)
)
)
+ (func $loopy (param $0 i32)
+ (nop)
+ )
+ (func $unary (result f32)
+ (unreachable)
+ (f32.abs
+ (f32.const 2)
+ )
+ )
+ (func $binary (result f32)
+ (unreachable)
+ (unreachable)
+ (f32.add
+ (unreachable)
+ (unreachable)
+ )
+ (f32.add
+ (f32.const 5)
+ (f32.const 6)
+ )
+ )
+ (func $select (result i32)
+ (unreachable)
+ (unreachable)
+ (unreachable)
+ (select
+ (unreachable)
+ (unreachable)
+ (i32.const 10)
+ )
+ (select
+ (unreachable)
+ (i32.const 11)
+ (unreachable)
+ )
+ (select
+ (i32.const 12)
+ (unreachable)
+ (unreachable)
+ )
+ (select
+ (unreachable)
+ (unreachable)
+ (unreachable)
+ )
+ (select
+ (i32.const 13)
+ (i32.const 14)
+ (i32.const 15)
+ )
+ )
+ (func $block-to-one
+ (block $block0
+ )
+ (block $block1
+ (unreachable)
+ )
+ (block $block2
+ (unreachable)
+ )
+ (block $block3
+ (unreachable)
+ )
+ (block $block4
+ (unreachable)
+ )
+ )
)
diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast
index 480fafd67..e2e717807 100644
--- a/test/passes/vacuum.wast
+++ b/test/passes/vacuum.wast
@@ -63,5 +63,59 @@
)
)
)
+ (func $loopy (param $0 i32)
+ (loop (nop))
+ (loop
+ (nop)
+ (nop)
+ )
+ (loop
+ (get_local $0)
+ (i32.const 20)
+ )
+ )
+ (func $unary (result f32)
+ (f32.abs (f32.const 1.0)) ;; unneeded position
+ (f32.abs (unreachable)) ;; side effects
+
+ (f32.abs (f32.const 2.0)) ;; return position
+ )
+ (func $binary (result f32)
+ (f32.add (f32.const 1.0) (f32.const 2.0))
+ (f32.add (unreachable) (f32.const 3.0))
+ (f32.add (f32.const 4.0) (unreachable))
+ (f32.add (unreachable) (unreachable))
+
+ (f32.add (f32.const 5.0) (f32.const 6.0))
+ )
+ (func $select (result i32)
+ (select (i32.const 1) (i32.const 2) (i32.const 3))
+ (select (unreachable) (i32.const 4) (i32.const 5))
+ (select (i32.const 6) (unreachable) (i32.const 7))
+ (select (i32.const 8) (i32.const 9) (unreachable))
+ (select (unreachable) (unreachable) (i32.const 10))
+ (select (unreachable) (i32.const 11) (unreachable))
+ (select (i32.const 12) (unreachable) (unreachable))
+ (select (unreachable) (unreachable) (unreachable))
+
+ (select (i32.const 13) (i32.const 14) (i32.const 15))
+ )
+ (func $block-to-one
+ (block
+ (nop) (nop)
+ )
+ (block
+ (nop) (unreachable)
+ )
+ (block
+ (nop) (unreachable) (nop)
+ )
+ (block
+ (unreachable) (nop)
+ )
+ (block
+ (unreachable)
+ )
+ )
)
diff --git a/test/unit.fromasm b/test/unit.fromasm
index 71602edb0..74ef9b968 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -13,35 +13,9 @@
(export "big_negative" $big_negative)
(table $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg)
(func $big_negative
- (f64.const -2147483648)
- (f64.const -2147483648)
- (f64.const -21474836480)
- (f64.const 0.039625)
- (f64.const -0.039625)
+ (nop)
)
(func $importedDoubles (result f64)
- (f64.add
- (f64.add
- (f64.add
- (f64.load
- (i32.const 8)
- )
- (f64.load
- (i32.const 16)
- )
- )
- (f64.neg
- (f64.load
- (i32.const 16)
- )
- )
- )
- (f64.neg
- (f64.load
- (i32.const 8)
- )
- )
- )
(if
(i32.gt_s
(i32.load
@@ -129,29 +103,18 @@
(call_import $f64-to-int
(get_local $1)
)
- (f64.convert_s/i32
- (set_local $0
- (call_import $f64-to-int
- (f64.promote/f32
- (get_local $2)
- )
+ (set_local $0
+ (call_import $f64-to-int
+ (f64.promote/f32
+ (get_local $2)
)
)
)
- (f64.convert_u/i32
- (get_local $0)
- )
)
(func $seq
(f64.sub
- (block
- (f64.const 0.1)
- (f64.const 5.1)
- )
- (block
- (f64.const 3.2)
- (f64.const 4.2)
- )
+ (f64.const 5.1)
+ (f64.const 4.2)
)
)
(func $switcher (param $0 i32) (result i32)
@@ -235,7 +198,6 @@
)
(br $label$break$L1)
)
- (i32.const 1)
(br $switch$17)
)
(br $label$break$L3)
@@ -272,37 +234,15 @@
)
(func $fr (param $0 f32)
(local $1 f64)
- (f32.demote/f64
- (get_local $1)
- )
- (f32.const 5)
- (f32.const 0)
- (f32.const 5)
- (f32.const 0)
+ (nop)
)
(func $negZero (result f64)
(f64.const -0)
)
(func $abs
(local $0 i32)
- (select
- (i32.sub
- (i32.const 0)
- (set_local $0
- (i32.const 0)
- )
- )
- (get_local $0)
- (i32.lt_s
- (get_local $0)
- (i32.const 0)
- )
- )
- (f64.abs
- (f64.const 0)
- )
- (f32.abs
- (f32.const 0)
+ (set_local $0
+ (i32.const 0)
)
)
(func $neg
@@ -405,19 +345,7 @@
)
)
(func $ceiling_32_64 (param $0 f32) (param $1 f64)
- (f32.demote/f64
- (f64.ceil
- (get_local $1)
- )
- )
- (f32.mul
- (get_local $0)
- (f32.ceil
- (f32.demote/f64
- (get_local $1)
- )
- )
- )
+ (nop)
)
(func $aborts
(call_import $abort
@@ -451,22 +379,7 @@
)
(func $bitcasts (param $0 i32) (param $1 f32)
(local $2 f64)
- (f32.reinterpret/i32
- (get_local $0)
- )
- (f64.promote/f32
- (f32.reinterpret/i32
- (get_local $0)
- )
- )
- (i32.reinterpret/f32
- (get_local $1)
- )
- (i32.reinterpret/f32
- (f32.demote/f64
- (get_local $2)
- )
- )
+ (nop)
)
(func $z
(nop)
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise
index 44fbdcbb4..77ce73239 100644
--- a/test/unit.fromasm.imprecise
+++ b/test/unit.fromasm.imprecise
@@ -11,35 +11,9 @@
(export "big_negative" $big_negative)
(table $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg)
(func $big_negative
- (f64.const -2147483648)
- (f64.const -2147483648)
- (f64.const -21474836480)
- (f64.const 0.039625)
- (f64.const -0.039625)
+ (nop)
)
(func $importedDoubles (result f64)
- (f64.add
- (f64.add
- (f64.add
- (f64.load
- (i32.const 8)
- )
- (f64.load
- (i32.const 16)
- )
- )
- (f64.neg
- (f64.load
- (i32.const 16)
- )
- )
- )
- (f64.neg
- (f64.load
- (i32.const 8)
- )
- )
- )
(if
(i32.gt_s
(i32.load
@@ -124,30 +98,16 @@
(local $0 i32)
(local $1 f64)
(local $2 f32)
- (i32.trunc_s/f64
- (get_local $1)
- )
- (f64.convert_s/i32
- (set_local $0
- (i32.trunc_s/f32
- (get_local $2)
- )
+ (set_local $0
+ (i32.trunc_s/f32
+ (get_local $2)
)
)
- (f64.convert_u/i32
- (get_local $0)
- )
)
(func $seq
(f64.sub
- (block
- (f64.const 0.1)
- (f64.const 5.1)
- )
- (block
- (f64.const 3.2)
- (f64.const 4.2)
- )
+ (f64.const 5.1)
+ (f64.const 4.2)
)
)
(func $switcher (param $0 i32) (result i32)
@@ -231,7 +191,6 @@
)
(br $label$break$L1)
)
- (i32.const 1)
(br $switch$17)
)
(br $label$break$L3)
@@ -268,37 +227,15 @@
)
(func $fr (param $0 f32)
(local $1 f64)
- (f32.demote/f64
- (get_local $1)
- )
- (f32.const 5)
- (f32.const 0)
- (f32.const 5)
- (f32.const 0)
+ (nop)
)
(func $negZero (result f64)
(f64.const -0)
)
(func $abs
(local $0 i32)
- (select
- (i32.sub
- (i32.const 0)
- (set_local $0
- (i32.const 0)
- )
- )
- (get_local $0)
- (i32.lt_s
- (get_local $0)
- (i32.const 0)
- )
- )
- (f64.abs
- (f64.const 0)
- )
- (f32.abs
- (f32.const 0)
+ (set_local $0
+ (i32.const 0)
)
)
(func $neg
@@ -401,19 +338,7 @@
)
)
(func $ceiling_32_64 (param $0 f32) (param $1 f64)
- (f32.demote/f64
- (f64.ceil
- (get_local $1)
- )
- )
- (f32.mul
- (get_local $0)
- (f32.ceil
- (f32.demote/f64
- (get_local $1)
- )
- )
- )
+ (nop)
)
(func $aborts
(call_import $abort
@@ -447,22 +372,7 @@
)
(func $bitcasts (param $0 i32) (param $1 f32)
(local $2 f64)
- (f32.reinterpret/i32
- (get_local $0)
- )
- (f64.promote/f32
- (f32.reinterpret/i32
- (get_local $0)
- )
- )
- (i32.reinterpret/f32
- (get_local $1)
- )
- (i32.reinterpret/f32
- (f32.demote/f64
- (get_local $2)
- )
- )
+ (nop)
)
(func $z
(nop)