diff options
author | Heejin Ahn <aheejin@gmail.com> | 2023-10-03 15:17:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 15:17:31 -0700 |
commit | 5854873dfbf291018853f9da62c9cdb55007b27f (patch) | |
tree | 63c8d80153ddeb96e6ca5c47997abf7ae2568c61 /test/lit/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.wast | |
parent | b14b2e3e931d421da1738da70369451402495c42 (diff) | |
download | binaryen-5854873dfbf291018853f9da62c9cdb55007b27f.tar.gz binaryen-5854873dfbf291018853f9da62c9cdb55007b27f.tar.bz2 binaryen-5854873dfbf291018853f9da62c9cdb55007b27f.zip |
Asyncify: Simpify if into i32.or (#5988)
```wast
(if (result i32)
(expr0)
(i32.const 1)
(expr1)
)
```
can be written as
```wast
(i32.or
(expr0)
(expr1)
)
```
Also this removes some unused variables and methods.
This also adds an optimization for
```wast
(i32.eqz
(global.get $__asyncify_state)
)
```
in `--mod-asyncify-always-and-only-unwind` to fix an unexpected
regression caused by this.
Diffstat (limited to 'test/lit/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.wast')
-rw-r--r-- | test/lit/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.wast | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/lit/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.wast b/test/lit/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.wast index e0baa77af..c2e81126c 100644 --- a/test/lit/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.wast +++ b/test/lit/passes/asyncify_pass-arg=asyncify-blacklist@foo,bar.wast @@ -80,12 +80,11 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if - ;; CHECK-NEXT: (if (result i32) + ;; CHECK-NEXT: (i32.or ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (global.get $__asyncify_state) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (i32.const 0) @@ -176,12 +175,11 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if - ;; CHECK-NEXT: (if (result i32) + ;; CHECK-NEXT: (i32.or ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (global.get $__asyncify_state) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (i32.const 0) |