[llvm] r281773 - [WebAssembly] Fix function types of CFGStackify tests

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 16:41:32 PDT 2016


On Fri, Sep 16, 2016 at 3:04 PM, Derek Schuff <dschuff at google.com> wrote:

>
> Which you could simplify to
> (module
>   (func $minimal_loop (param $0 i32) (result i32)
>     (block $label$1
>       (loop $label$0
>         (br $label$0)
>       )
>     )
>   )
> )
>
> Which is a type check failure because the loop/block structure
> yields/pushes no value but the function expects an i32 return.
>

This is actually a valid WebAssembly program :-). One of the main branches
of the reference interpreter currently issues an error here, but it's a
bug: the intention is that because the `br` makes code after it
unreachable, so there doesn't need to be a return value after it.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160916/d73f573c/attachment.html>


More information about the llvm-commits mailing list