summaryrefslogtreecommitdiff
path: root/test/passes/optimize-instructions_all-features.wast
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-12-02 14:18:48 -0800
committerGitHub <noreply@github.com>2020-12-02 14:18:48 -0800
commitaa53194dc3ce4676e124ee1af65eb8039b1da7b2 (patch)
treeb6dd38a61fffae1062ae12867fa26df3ad8c29fe /test/passes/optimize-instructions_all-features.wast
parente5f5d924ddee6d896203b3d1da862c463c01df24 (diff)
downloadbinaryen-aa53194dc3ce4676e124ee1af65eb8039b1da7b2.tar.gz
binaryen-aa53194dc3ce4676e124ee1af65eb8039b1da7b2.tar.bz2
binaryen-aa53194dc3ce4676e124ee1af65eb8039b1da7b2.zip
[OptimizeInstructions] Fix a fuzz bug with getting the shifts of an unreachable (#3413)
Diffstat (limited to 'test/passes/optimize-instructions_all-features.wast')
-rw-r--r--test/passes/optimize-instructions_all-features.wast13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions_all-features.wast b/test/passes/optimize-instructions_all-features.wast
index 3b25238c0..d90dd7aeb 100644
--- a/test/passes/optimize-instructions_all-features.wast
+++ b/test/passes/optimize-instructions_all-features.wast
@@ -805,6 +805,19 @@
(i32.const 0)
)
)
+ (drop
+ (if (result i32)
+ (i32.shr_s
+ (i32.shl
+ (unreachable) ;; ignore an unreachable value
+ (i32.const 16)
+ )
+ (i32.const 16)
+ )
+ (i32.const 111)
+ (i32.const 222)
+ )
+ )
)
(func $sign-ext-input (param $0 i32) (param $1 i32)
(drop