diff options
author | Alon Zakai <azakai@google.com> | 2021-10-27 17:33:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 17:33:12 -0700 |
commit | 2d585ebad9885259932168daf7384b58154badd6 (patch) | |
tree | c1ccf03ca489857f99081c5494b408a69b599ddd /test/lit/passes/optimize-instructions-gc-heap.wast | |
parent | 5ec74cf79590648f3a633387f0d1d8a5930a410b (diff) | |
download | binaryen-2d585ebad9885259932168daf7384b58154badd6.tar.gz binaryen-2d585ebad9885259932168daf7384b58154badd6.tar.bz2 binaryen-2d585ebad9885259932168daf7384b58154badd6.zip |
Fix printing of some unreachable GC instructions (#4281)
We have separate logic for printing their headers and bodies, and they were not in sync.
Specifically, we would not emit drops in the body of a block, which is not valid, and would
fail roundtripping on text.
Diffstat (limited to 'test/lit/passes/optimize-instructions-gc-heap.wast')
-rw-r--r-- | test/lit/passes/optimize-instructions-gc-heap.wast | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/lit/passes/optimize-instructions-gc-heap.wast b/test/lit/passes/optimize-instructions-gc-heap.wast index e14f101c6..fc44e11de 100644 --- a/test/lit/passes/optimize-instructions-gc-heap.wast +++ b/test/lit/passes/optimize-instructions-gc-heap.wast @@ -713,8 +713,10 @@ ;; CHECK: (func $unreachable ;; CHECK-NEXT: (local $ref (ref null $struct)) ;; CHECK-NEXT: (local.tee $ref - ;; CHECK-NEXT: (block - ;; CHECK-NEXT: (unreachable) + ;; CHECK-NEXT: (block ;; (replaces something unreachable we can't emit) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (unreachable) + ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (struct.set $struct 0 |