summaryrefslogtreecommitdiff
path: root/test/passes/code-folding.wast
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-09-27 13:08:24 -0700
committerAlon Zakai <alonzakai@gmail.com>2017-09-27 13:08:24 -0700
commitd4f7519e64d2246be81b24b8e5fc72c8abccb759 (patch)
treefa2069220ddc7c461319846551fdc9deffe225bf /test/passes/code-folding.wast
parent27af98deb91d1d64be44cdf12f01833b677fbf34 (diff)
downloadbinaryen-d4f7519e64d2246be81b24b8e5fc72c8abccb759.tar.gz
binaryen-d4f7519e64d2246be81b24b8e5fc72c8abccb759.tar.bz2
binaryen-d4f7519e64d2246be81b24b8e5fc72c8abccb759.zip
fix ExpressionAnalyzer::equals on consts, they need to be bitwise equal, i.e., 0 != -0
Diffstat (limited to 'test/passes/code-folding.wast')
-rw-r--r--test/passes/code-folding.wast33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/passes/code-folding.wast b/test/passes/code-folding.wast
index 2310f9721..ca1768c16 100644
--- a/test/passes/code-folding.wast
+++ b/test/passes/code-folding.wast
@@ -19,5 +19,38 @@
)
)
)
+ (func $negative-zero (result f32)
+ (if (result f32)
+ (i32.const 0)
+ (block $label$0 (result f32)
+ (f32.const 0)
+ )
+ (block $label$1 (result f32)
+ (f32.const -0)
+ )
+ )
+ )
+ (func $negative-zero-b (result f32)
+ (if (result f32)
+ (i32.const 0)
+ (block $label$0 (result f32)
+ (f32.const -0)
+ )
+ (block $label$1 (result f32)
+ (f32.const -0)
+ )
+ )
+ )
+ (func $negative-zero-c (result f32)
+ (if (result f32)
+ (i32.const 0)
+ (block $label$0 (result f32)
+ (f32.const 0)
+ )
+ (block $label$1 (result f32)
+ (f32.const 0)
+ )
+ )
+ )
)