summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-06-05 19:34:34 -0700
committerGitHub <noreply@github.com>2019-06-05 19:34:34 -0700
commit616abe47020c90278eaf8d14ae9815c31d2d14fb (patch)
tree91ad94c219f2028285605e3285b19d81ad655878 /test
parent917fabf8fb8c2efbfadc608efa79c0937830ce10 (diff)
downloadbinaryen-616abe47020c90278eaf8d14ae9815c31d2d14fb.tar.gz
binaryen-616abe47020c90278eaf8d14ae9815c31d2d14fb.tar.bz2
binaryen-616abe47020c90278eaf8d14ae9815c31d2d14fb.zip
Use splatted zero vector in makeZero (#2164)
This prevents the optimizer from producing v128.const instructions, which are not supported by V8 at this time.
Diffstat (limited to 'test')
-rw-r--r--test/passes/ssa-nomerge_enable-simd.txt (renamed from test/passes/ssa-nomerge.txt)12
-rw-r--r--test/passes/ssa-nomerge_enable-simd.wast (renamed from test/passes/ssa-nomerge.wast)10
2 files changed, 21 insertions, 1 deletions
diff --git a/test/passes/ssa-nomerge.txt b/test/passes/ssa-nomerge_enable-simd.txt
index 48f34f054..7674e0626 100644
--- a/test/passes/ssa-nomerge.txt
+++ b/test/passes/ssa-nomerge_enable-simd.txt
@@ -1,6 +1,8 @@
(module
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
+ (type $FUNCSIG$v (func))
+ (memory $0 1 1)
(global $global$0 (mut i32) (i32.const 1))
(func $basics (; 0 ;) (type $FUNCSIG$vi) (param $x i32)
(local $y i32)
@@ -199,4 +201,14 @@
(local.get $x)
)
)
+ (func $simd-zero (; 4 ;) (type $FUNCSIG$v)
+ (local $0 v128)
+ (v128.store align=4
+ (i32.const 0)
+ (i32x4.splat
+ (i32.const 0)
+ )
+ )
+ (unreachable)
+ )
)
diff --git a/test/passes/ssa-nomerge.wast b/test/passes/ssa-nomerge_enable-simd.wast
index dec7c89e5..fa1187a7f 100644
--- a/test/passes/ssa-nomerge.wast
+++ b/test/passes/ssa-nomerge_enable-simd.wast
@@ -1,4 +1,5 @@
(module
+ (memory 1 1)
(global $global$0 (mut i32) (i32.const 1))
(func $basics (param $x i32)
(local $y i32)
@@ -98,5 +99,12 @@
)
(call $nomerge (local.get $x) (local.get $x))
)
+ (func $simd-zero
+ (local $0 v128)
+ (v128.store align=4
+ (i32.const 0)
+ (local.get $0)
+ )
+ (unreachable)
+ )
)
-