Allow O2K_CONST_VEC to handle all TYP_SIMD32/64#127402
Merged
tannergooding merged 4 commits intodotnet:mainfrom Apr 25, 2026
Merged
Allow O2K_CONST_VEC to handle all TYP_SIMD32/64#127402tannergooding merged 4 commits intodotnet:mainfrom
tannergooding merged 4 commits intodotnet:mainfrom
Conversation
Extend the O2K_CONST_VEC assertion storage to handle TYP_SIMD32/64 via a heap-allocated simd_t* (m_bigSimdVal) in the existing union. SIMD8/12/16 continue to use the inline simd16_t. The active SIMD byte size is tracked in m_simdSize, unioned with m_encodedIconFlags to keep struct size unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…equality Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
Pull request overview
Enables O2K_CONST_VEC assertions to represent all SIMD constants (including TYP_SIMD32/64) by storing wider constants out-of-line, allowing assertion propagation and related optimizations to apply to more SIMD constant cases.
Changes:
- Extend
AssertionDscSIMD-constant storage to supportTYP_SIMD32/64via heap allocation, while keepingTYP_SIMD8/12/16inline. - Update assertion equality and constant propagation logic to use a size-tagged SIMD payload (
GetSimdSize()/GetSimdConstant()). - Expand
optAssertionGenJtruehandling to recognize Vector256/Vector512 equality/inequality intrinsics on xarch.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/jit/compiler.h | Adds size-tagged SIMD constant payload handling in AssertionDsc with inline vs heap-backed storage for wider vectors. |
| src/coreclr/jit/assertionprop.cpp | Creates and propagates SIMD constant assertions for all SIMD sizes, and recognizes additional SIMD equality/inequality intrinsics. |
EgorBo
approved these changes
Apr 25, 2026
This was referenced Apr 25, 2026
Open
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 provides O2K_CONST_VEC support for all SIMD constants by heap allocating for values larger than TYP_SIMD16. It is an alternative to #127390.