-
Notifications
You must be signed in to change notification settings - Fork 517
Closed
Description
In binary_0xc the block test has
(func (export "break-repeated") (result i32)
(block i32
(br 0 (i32.const 18))
(br 0 (i32.const 19))
(br_if 0 (i32.const 20) (i32.const 0))
(br_if 0 (i32.const 20) (i32.const 1))
(br 0 (i32.const 21))
(br_table 0 (i32.const 22) (i32.const 4))
(br_table 0 0 0 (i32.const 23) (i32.const 1))
(i32.const 21)
)
)
Since br_if now returns its value, those br_ifs should normally be dropped, I believe. I guess the reason they aren't dropped here is br clearing the stack?
If that's the case, then I'd like to propose moving such tests to stack.wast. The motivation is that Binaryen doesn't intend to support such "stacky" code (as it doesn't fit well with its internal optimization IR). We would like to pass the test suite sans stack.wast, basically. (So far I've maintained a list of such code in other tests, to ignore them, but I can only ignore a whole module, and in the case here, that means ignoring a lot of non-stacky parts.) If that sounds ok I can make a PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels