summaryrefslogtreecommitdiff
path: root/test/passes/optimize-instructions_all-features.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/optimize-instructions_all-features.wast')
-rw-r--r--test/passes/optimize-instructions_all-features.wast51
1 files changed, 51 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions_all-features.wast b/test/passes/optimize-instructions_all-features.wast
index 1afa3e5b5..59e7e21d8 100644
--- a/test/passes/optimize-instructions_all-features.wast
+++ b/test/passes/optimize-instructions_all-features.wast
@@ -4063,6 +4063,57 @@
)
(i64.const 0)
))
+ ;; eqz((i32(bool(expr)) != 0) != 0)
+ (drop (i32.eqz
+ (i32.ne
+ (i32.ne
+ (i32.shr_u
+ (local.get $x)
+ (i32.const 31)
+ )
+ (i32.const 0)
+ )
+ (i32.const 0)
+ )
+ ))
+ ;; i32.eqz(wrap(i64(x)))
+ (drop (i32.eqz
+ (i32.wrap_i64
+ (i64.shr_u
+ (local.get $y)
+ (i64.const 63)
+ )
+ )
+ ))
+ ;; eqz((i64(bool(expr)) != 0) != 0)
+ (drop (i32.eqz
+ (i32.ne
+ (i64.ne
+ (i64.shr_u
+ (local.get $y)
+ (i64.const 63)
+ )
+ (i64.const 0)
+ )
+ (i32.const 0)
+ )
+ ))
+ ;; eqz((i64(bool(expr)) != 0) != 0)
+ (drop (i32.eqz
+ (i32.ne
+ (i64.ne
+ (local.get $y)
+ (i64.const 0)
+ )
+ (i32.const 0)
+ )
+ ))
+ ;; i32.eqz(wrap(i64(x))) -> skip
+ (drop (i32.eqz
+ (i32.wrap_i64
+ (local.get $y)
+ )
+ ))
;; i64(bool(expr)) == 1 -> i32(bool(expr))
(drop (i64.eq
(i64.and