Add x64 disasm regression for BitConverter.SingleToInt32Bits in hot Span<float> loops#9
Draft
Copilot wants to merge 3 commits into
Draft
Add x64 disasm regression for BitConverter.SingleToInt32Bits in hot Span<float> loops#9Copilot wants to merge 3 commits into
BitConverter.SingleToInt32Bits in hot Span<float> loops#9Copilot wants to merge 3 commits into
Conversation
Co-authored-by: steveisok <471438+steveisok@users.noreply.github.com>
Co-authored-by: steveisok <471438+steveisok@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix suboptimal codegen for BitConverter.SingleToInt32Bits
Add x64 disasm regression for May 28, 2026
BitConverter.SingleToInt32Bits in hot Span<float> loops
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.
BitConverter.SingleToInt32Bitsin tightSpan<float>loops can regress to a stack roundtrip (movssstore +movreload) instead of a direct register transfer (movd). This PR adds a focused JIT regression test to lock in the expected x64 codegen shape.Regression coverage
src/tests/JIT/Regression/JitBlue/Runtime_130999/Runtime_130999.cs.SingleToInt32Bitsin a hot loop with an additional float use to keep the value in FP registers before bit reinterpretation.Disasm check wiring
Runtime_130999.csprojwithHasDisasmCheck=trueand standard JIT test env settings for deterministic disasm validation.Functional guardrails
NaN, infinities, epsilon) so the codegen check remains attached to a correct computation path.