Skip to content

mutate: Don't reorder, drop or duplicate effectful operands - #2775

Merged
fitzgen merged 1 commit into
bytecodealliance:mainfrom
tamaroning:fix-peephole-effectful-ops
Oct 23, 2026
Merged

fitzgen merged 1 commit into
bytecodealliance:mainfrom
tamaroning:fix-peephole-effectful-ops

Conversation

@tamaroning

Copy link
Copy Markdown
Contributor

Fix #2767

@tamaroning
tamaroning requested a review from a team as a code owner October 18, 2026 11:21
@tamaroning
tamaroning requested review from fitzgen and removed request for a team October 18, 2026 11:21
@alexcrichton

Copy link
Copy Markdown
Member

I commented a bit more here, but I think this is a bit too much for me to take on in reviewing personally at least. @fitzgen if you'd like I'll leave you assigned, but again I'll caution you @tamaroning that wasm-mutate is not in a great spot right now necessarily

@fitzgen fitzgen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

As Alex said, wasm-mutate is not in the best spot right now and is definitely lacking polish and love. I'd like to half-rewrite/half-port it over to mutatis (see also this blog post) at some point in time, and I think the peephole stuff needs to be pretty much completely overhauled, but that's pretty far down my never-ending list of TODOs.

I think the best thing that can be done for it until then is probably just making it better for the purposes of wasm-tools shrink (i.e. focusing on non-semantics preserving mutations that help reduce test cases).

@fitzgen
fitzgen added this pull request to the merge queue Oct 23, 2026
Merged via the queue into bytecodealliance:main with commit 891e113 Oct 23, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mutate breaks semantics: peephole treats memory.grow, table.grow and trapping instructions as pure

3 participants