diff options
author | Sam Clegg <sbc@chromium.org> | 2020-04-10 01:01:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 22:01:23 -0700 |
commit | 6a51af5d858b6d3378749d17065c44cf50b62a26 (patch) | |
tree | 20dfbc05715519ff75355143c851b6c2e5fb3d81 /test/memorygrowth.fromasm.imprecise | |
parent | 1b56c2b341e838656adca9a7101d824ed757d6ad (diff) | |
download | binaryen-6a51af5d858b6d3378749d17065c44cf50b62a26.tar.gz binaryen-6a51af5d858b6d3378749d17065c44cf50b62a26.tar.bz2 binaryen-6a51af5d858b6d3378749d17065c44cf50b62a26.zip |
Remove writes to globals that are never written to (#2741)
Since the global is never read, we know that any write operation
will be unobservable.
Diffstat (limited to 'test/memorygrowth.fromasm.imprecise')
-rw-r--r-- | test/memorygrowth.fromasm.imprecise | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index cec88c90f..b90edfcd6 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -12,7 +12,6 @@ (elem (global.get $__table_base) $nb $Oa $ob $Va $Ua $Ra $pb $Sa) (import "env" "__table_base" (global $__table_base i32)) (import "env" "STACKTOP" (global $r$asm2wasm$import i32)) - (import "env" "STACK_MAX" (global $s$asm2wasm$import i32)) (import "env" "abort" (func $ja (param i32))) (import "env" "_pthread_cleanup_pop" (func $oa (param i32))) (import "env" "___lock" (func $pa (param i32))) @@ -26,9 +25,7 @@ (import "env" "___unlock" (func $xa (param i32))) (import "env" "___syscall146" (func $ya (param i32 i32) (result i32))) (global $r (mut i32) (global.get $r$asm2wasm$import)) - (global $s (mut i32) (global.get $s$asm2wasm$import)) (global $v (mut i32) (i32.const 0)) - (global $w (mut i32) (i32.const 0)) (global $K (mut i32) (i32.const 0)) (export "__growWasmMemory" (func $__growWasmMemory)) (export "_free" (func $fb)) @@ -8986,13 +8983,8 @@ (i32.eqz (global.get $v) ) - (block - (global.set $v - (local.get $0) - ) - (global.set $w - (local.get $1) - ) + (global.set $v + (local.get $0) ) ) ) @@ -9024,9 +9016,6 @@ (global.set $r (local.get $0) ) - (global.set $s - (local.get $1) - ) ) (func $nb (; has Stack IR ;) (param $0 i32) (result i32) (call $ja |