Skip to content

Allow O2K_CONST_VEC to handle all TYP_SIMD32/64#127402

Merged
tannergooding merged 4 commits intodotnet:mainfrom
tannergooding:jit/wide-simd-assertions
Apr 25, 2026
Merged

Allow O2K_CONST_VEC to handle all TYP_SIMD32/64#127402
tannergooding merged 4 commits intodotnet:mainfrom
tannergooding:jit/wide-simd-assertions

Conversation

@tannergooding
Copy link
Copy Markdown
Member

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.

EgorBo and others added 4 commits April 24, 2026 17:48
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>
Copilot AI review requested due to automatic review settings April 24, 2026 21:00
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 24, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AssertionDsc SIMD-constant storage to support TYP_SIMD32/64 via heap allocation, while keeping TYP_SIMD8/12/16 inline.
  • Update assertion equality and constant propagation logic to use a size-tagged SIMD payload (GetSimdSize()/GetSimdConstant()).
  • Expand optAssertionGenJtrue handling 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.

@tannergooding tannergooding marked this pull request as ready for review April 25, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants