Skip to content

asm2wasm not folding away some redundant type coercions #17

Closed

Description

Spotted at lot of (i32.shr_u <exp> 0) operations. Most are probably a remnant of asm.js style and should be removed?

For example: (i32.gt_u (i32.shr_u (get_local $i3) (i32.const 0)) (i32.shr_u (get_local $i1) (i32.const 0))))

Activity

  1. kripken commented on Dec 21, 2015

    @kripken
    Member

    Yes, we should remove those. What source code led to them?

  2. kripken commented on Dec 21, 2015

    @kripken
    Member

    I see, thanks, looks like for calls and returns we look through the coercions, but for comparisons specifically we don't. Looking into that now.

  3. kripken commented on Dec 21, 2015

    @kripken
    Member

    Ok, the issue wasn't comparisons, but rather that we had the look-through logic for |0 but not >>>0. Fixed on master. Thanks again for filing!

  4. kripken commented on Dec 21, 2015

    @kripken
    Member

    Forgot to add the issue # in the commit, it was this: 2654fe2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions