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.wast22
1 files changed, 19 insertions, 3 deletions
diff --git a/test/passes/optimize-instructions_all-features.wast b/test/passes/optimize-instructions_all-features.wast
index ad422bd98..c3a6aaf59 100644
--- a/test/passes/optimize-instructions_all-features.wast
+++ b/test/passes/optimize-instructions_all-features.wast
@@ -5458,15 +5458,31 @@
(i64.const 63)
)
))
-
- ;; skip
- (drop (i32.shl
+ ;; i32(x) >> (y & 32) -> x
+ (drop (i32.shr_u
(local.get $x)
(i32.and
(local.get $y)
(i32.const 32)
)
))
+ ;; i64(x) >> (y & 64) -> x
+ (drop (i64.shr_u
+ (local.get $z)
+ (i64.and
+ (local.get $w)
+ (i64.const 128)
+ )
+ ))
+
+ ;; skip
+ (drop (i64.shl
+ (local.get $z)
+ (i64.and
+ (local.get $w)
+ (i64.const 32)
+ )
+ ))
;; skip
(drop (i64.shr_u
(local.get $z)