summaryrefslogtreecommitdiff
path: root/test/passes/optimize-instructions_all-features.wast
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2020-10-28 20:52:24 +0200
committerGitHub <noreply@github.com>2020-10-28 11:52:24 -0700
commit8cd3ad23543b1e6d0c8e5f8a1563ca5f87960645 (patch)
treebb76dbca3a1636111efdc2de9a0e6bb9c02fabd3 /test/passes/optimize-instructions_all-features.wast
parent5f7d2636e926e0061e4f07dfd5c864d32a7f6144 (diff)
downloadbinaryen-8cd3ad23543b1e6d0c8e5f8a1563ca5f87960645.tar.gz
binaryen-8cd3ad23543b1e6d0c8e5f8a1563ca5f87960645.tar.bz2
binaryen-8cd3ad23543b1e6d0c8e5f8a1563ca5f87960645.zip
Fix pow2 util and avoid pow2 for left shifting in ZeroRemover (#3293)
Fixes a fuzz bug that was triggered by https://github.com/WebAssembly/binaryen/pull/3015#issuecomment-718001620 but was actually a pre-existing bug in pow2, that that PR just happened to uncover.
Diffstat (limited to 'test/passes/optimize-instructions_all-features.wast')
-rw-r--r--test/passes/optimize-instructions_all-features.wast15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions_all-features.wast b/test/passes/optimize-instructions_all-features.wast
index cdd203fa4..02f55b20c 100644
--- a/test/passes/optimize-instructions_all-features.wast
+++ b/test/passes/optimize-instructions_all-features.wast
@@ -2683,6 +2683,21 @@
)
)
)
+ (func $zero-ops-64-special (result i32)
+ (return
+ (i32.wrap_i64
+ (i64.popcnt
+ (i64.sub
+ (i64.shl
+ (i64.const 4294783828)
+ (i64.const 17179869183)
+ )
+ (i64.const -7377)
+ )
+ )
+ )
+ )
+ )
(func $sign-ext-1-and-ne (result i32)
(select
(i32.ne