summaryrefslogtreecommitdiff
path: root/test/lit/binary/bad-multivalue-if.test
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-12-13 13:23:42 -0800
committerGitHub <noreply@github.com>2024-12-13 13:23:42 -0800
commit8a88ba280b2847d4d25d0859a87529e2132ebab8 (patch)
treea4723dbd4f43b1b01b8bcc3bcdbf5f80f7d93d4a /test/lit/binary/bad-multivalue-if.test
parent52bc45fc34ec6868400216074744147e9d922685 (diff)
downloadbinaryen-8a88ba280b2847d4d25d0859a87529e2132ebab8.tar.gz
binaryen-8a88ba280b2847d4d25d0859a87529e2132ebab8.tar.bz2
binaryen-8a88ba280b2847d4d25d0859a87529e2132ebab8.zip
Support control flow inputs in IRBuilder (#7149)
Since multivalue was standardized, WebAssembly has supported not only multiple results but also an arbitrary number of inputs on control flow structures, but until now Binaryen did not support control flow input. Binaryen IR still has no way to represent control flow input, so lower it away using scratch locals in IRBuilder. Since both the text and binary parsers use IRBuilder, this gives us full support for parsing control flow inputs. The lowering scheme is mostly simple. A local.set writing the control flow inputs to a scratch local is inserted immediately before the control flow structure begins and a local.get retrieving those inputs is inserted inside the control flow structure before the rest of its body. The only complications come from ifs, in which the inputs must be retrieved at the beginning of both arms, and from loops, where branches to the beginning of the loop must be transformed so their values are written to the scratch local along the way. Resolves #6407.
Diffstat (limited to 'test/lit/binary/bad-multivalue-if.test')
-rw-r--r--test/lit/binary/bad-multivalue-if.test22
1 files changed, 0 insertions, 22 deletions
diff --git a/test/lit/binary/bad-multivalue-if.test b/test/lit/binary/bad-multivalue-if.test
deleted file mode 100644
index 8fe206012..000000000
--- a/test/lit/binary/bad-multivalue-if.test
+++ /dev/null
@@ -1,22 +0,0 @@
-;; Test that we error properly on an if with a bad multivalue (inputs).
-
-;; File contents:
-;;
-;; (module
-;; (func $test
-;; i32.const 0
-;; i32.const 1
-;; (if (param i32)
-;; (then
-;; drop
-;; )
-;; (else
-;; drop
-;; )
-;; )
-;; )
-;; )
-
-;; RUN: not wasm-opt -all %s.wasm 2>&1 | filecheck %s
-
-;; CHECK: control flow inputs are not supported yet