diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/optimize-instructions_all-features.txt | 16 | ||||
-rw-r--r-- | test/passes/optimize-instructions_all-features.wast | 22 |
2 files changed, 30 insertions, 8 deletions
diff --git a/test/passes/optimize-instructions_all-features.txt b/test/passes/optimize-instructions_all-features.txt index 27daa5ce1..80bd7a89d 100644 --- a/test/passes/optimize-instructions_all-features.txt +++ b/test/passes/optimize-instructions_all-features.txt @@ -4968,11 +4968,17 @@ ) ) (drop - (i32.shl - (local.get $x) - (i32.and - (local.get $y) - (i32.const 32) + (local.get $x) + ) + (drop + (local.get $z) + ) + (drop + (i64.shl + (local.get $z) + (i64.and + (local.get $w) + (i64.const 32) ) ) ) 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) |