Repository navigation
JIT: omit redundant wasm eqz pairs before conditional branches - #137205
Merged
Merged
Conversation
Fold i32.eqz; i32.eqz; br_if to br_if. Contributes to dotnet#135985. Co-authored-by: Copilot <[email protected]> Copilot-Session: 1da7d7aa-79b4-4ae1-ae4a-9861fdf9681c
Member
Author
|
@adamperlin PTAL |
|
Azure Pipelines: Successfully started running 6 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
Co-authored-by: Copilot <[email protected]> Copilot-Session: 1da7d7aa-79b4-4ae1-ae4a-9861fdf9681c
adamperlin
approved these changes
Nov 9, 2026
Member
Author
|
Failure is similar to #123280. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fold
i32.eqz; i32.eqz; br_iftobr_if. The twoeqzinstructions normalize an i32 to 0/1, which a conditional branch does not need. Value-producing and mixed-width sequences remain unchanged.Enable the emitter's existing backward instruction navigation for Wasm. Keep zero-byte descriptors for elided instructions so captured instruction positions remain valid.
Size
Havit composite R2R:
All 25,312 double-
eqzbranch sequences disappear from the linked image. SuperPMI: 38,469 successful contexts per JIT, 8,081 smaller, none larger. No GC-info size or EH-clause-count changes. Size figures use emitted code-byte metrics; the Wasm native differ has known decoder failures and false reports.Validation
build.cmd clr.crossarchtools -os browser -arch wasm -c Release /p:RuntimeFlavor=CoreCLRpassed for baseline and changed JITs.build.cmd clr.crossarchtools -os browser -arch wasm -c Checked /p:RuntimeFlavor=CoreCLRpassed.STRESS_EMITTER.Contributes to #135985.
Note
This PR description was generated with GitHub Copilot.