Skip to content

wasm-opt doesn't drop some stack shuffling instructions before unreachable #6715

Description

@osa1

When I optimize the attached .wasm with the current main branch (9792f2c) using this invocation:

wasm-opt \
      -g \
      --all-features \
      --closed-world \
      --traps-never-happen \
      --type-unfinalizing \
      -Os \
      --type-ssa \
      --gufa \
      -Os \
      --type-merging \
      -Os \
      --type-finalizing \
      test.wasm -o test.opt.wasm

The generated .wasm has 34 instruction sequences of drop; unreachable.

In those cases the drop instruction could be dropped.

test.wasm.zip

Activity

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