[Wasm RyuJit] HW Intrinsic Regalloc: Properly consume temporary from addr operand#131113
Open
adamperlin wants to merge 3 commits into
Open
[Wasm RyuJit] HW Intrinsic Regalloc: Properly consume temporary from addr operand#131113adamperlin wants to merge 3 commits into
adamperlin wants to merge 3 commits into
Conversation
adamperlin
commented
Jul 20, 2026
Contributor
Author
There was a problem hiding this comment.
Unrelated formatting diff
|
Azure Pipelines: Successfully started running 6 pipeline(s). 10 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 'arch-wasm': @lewing, @pavelsavara |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts Wasm RyuJIT register allocation to consume the temporary register associated with multiply-used address operands on certain hardware intrinsics (to avoid leaving an outstanding temp allocation during reference collection).
Changes:
- Add logic in
WasmRegAlloc::CollectReferencesForHardwareIntrinsicto consume the temporary for a memory address operand. - Reformat a couple of long boolean expressions in
RangeOps::Add(unrelated to the Wasm change).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/coreclr/jit/regallocwasm.cpp | Attempts to consume multiply-used temporaries for HW intrinsic address operands during Wasm regalloc reference collection. |
| src/coreclr/jit/rangecheck.h | Formatting-only line wrapping changes in RangeOps::Add logic. |
Comment on lines
+731
to
+735
| GenTree* addr; | ||
| if (node->OperIsMemoryLoad(&addr) || node->OperIsMemoryStore(&addr)) | ||
| { | ||
| ConsumeTemporaryRegForOperand(addr DEBUGARG("hardware intrinsic memory address null check")); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This is actually fixed in main already, the branch here was just out of date.
|
Azure Pipelines: Successfully started running 6 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
This was referenced Jul 21, 2026
Open
Closed
Comment on lines
+731
to
+735
| GenTree* addr; | ||
| if (node->OperIsMemoryLoad(&addr) || node->OperIsMemoryStore(&addr)) | ||
| { | ||
| ConsumeTemporaryRegForOperand(addr DEBUGARG("hardware intrinsic memory address null check")); | ||
| } |
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.
This was a bug introduced in #130822; We weren't consuming the multiply-used temporary introduced for null checks on addresses in PackedSimd load_lane/store_lane type operations.