summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.imprecise.no-opts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-09-06 16:38:16 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 18:42:15 -0700
commit2b98366e3f4787fc8d3d21ba0c01a577b8ea0d66 (patch)
tree87e84940011fe32620019571fde84eb4360d14c4 /test/unit.fromasm.imprecise.no-opts
parentc2072c3f7c96eed6abbc7901c181bec92e3b9ced (diff)
downloadbinaryen-2b98366e3f4787fc8d3d21ba0c01a577b8ea0d66.tar.gz
binaryen-2b98366e3f4787fc8d3d21ba0c01a577b8ea0d66.tar.bz2
binaryen-2b98366e3f4787fc8d3d21ba0c01a577b8ea0d66.zip
track globals in EffectAnalyzer
Diffstat (limited to 'test/unit.fromasm.imprecise.no-opts')
-rw-r--r--test/unit.fromasm.imprecise.no-opts35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts
index 244ef7cd8..b4add4ad7 100644
--- a/test/unit.fromasm.imprecise.no-opts
+++ b/test/unit.fromasm.imprecise.no-opts
@@ -1097,4 +1097,39 @@
(func $w
(nop)
)
+ (func $globalOpts
+ (local $x i32)
+ (local $y f64)
+ (set_local $x
+ (get_global $Int)
+ )
+ (set_local $y
+ (get_global $Double)
+ )
+ (i32.store8
+ (i32.const 13)
+ (i32.load
+ (i32.const 12)
+ )
+ )
+ (set_global $Double
+ (get_local $y)
+ )
+ (set_global $Int
+ (get_local $x)
+ )
+ (call $globalOpts)
+ (set_local $x
+ (get_global $Int)
+ )
+ (if
+ (i32.const 1)
+ (set_global $Int
+ (i32.const 20)
+ )
+ )
+ (set_global $Int
+ (get_local $x)
+ )
+ )
)