Skip to content

Fix multi-value operator result order.#16

Merged
cfallin merged 1 commit into
mainfrom
cfallin/fix-multi-value-call
May 18, 2026
Merged

Fix multi-value operator result order.#16
cfallin merged 1 commit into
mainfrom
cfallin/fix-multi-value-call

Conversation

@cfallin
Copy link
Copy Markdown
Member

@cfallin cfallin commented May 17, 2026

The localification (regalloc and local.get/local.set insertion) pass previously handled multi-value operators with results in the incorrect (reversed) order. This hadn't been caught yet as multi-value results had apparently not yet been used in a nontrivial use-case nor hit by a fuzzer. This PR fixes the order and adds a roundtrip test (the idempotency/fixpoint condition of the roundtrip test will fail if the results are reversed as they will flip on each roundtrip).

The localification (regalloc and local.get/local.set insertion) pass
previously handled multi-value operators with results in the incorrect
(reversed) order. This hadn't been caught yet as multi-value results had
apparently not yet been used in a nontrivial use-case nor hit by a
fuzzer. This PR fixes the order and adds a roundtrip test (the
idempotency/fixpoint condition of the roundtrip test will fail if the
results are reversed as they will flip on each roundtrip).
@cfallin cfallin requested a review from fitzgen May 17, 2026 05:03
@cfallin cfallin mentioned this pull request May 17, 2026
@cfallin cfallin merged commit 68ac68d into main May 18, 2026
3 checks passed
cfallin added a commit that referenced this pull request May 18, 2026
Includes fix #16 (multi-value operator result order) and enhancement
from #15 (split out dependencies and make them optional).
@cfallin cfallin deleted the cfallin/fix-multi-value-call branch May 18, 2026 17:27
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.

2 participants