summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/optimize-instructions_all-features.txt13
-rw-r--r--test/passes/optimize-instructions_all-features.wast13
2 files changed, 26 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions_all-features.txt b/test/passes/optimize-instructions_all-features.txt
index a093fbffa..677b220cb 100644
--- a/test/passes/optimize-instructions_all-features.txt
+++ b/test/passes/optimize-instructions_all-features.txt
@@ -969,6 +969,19 @@
(i32.const 0)
)
)
+ (drop
+ (if (result i32)
+ (i32.shr_s
+ (i32.shl
+ (unreachable)
+ (i32.const 16)
+ )
+ (i32.const 16)
+ )
+ (i32.const 111)
+ (i32.const 222)
+ )
+ )
)
(func $sign-ext-input (param $0 i32) (param $1 i32)
(drop
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