Skip to content

Allow O2K_CONST_VEC to handle all TYP_SIMD32/64#127401

Closed
tannergooding wants to merge 3 commits intodotnet:mainfrom
EgorBo:jit/wide-simd-assertions
Closed

Allow O2K_CONST_VEC to handle all TYP_SIMD32/64#127401
tannergooding wants to merge 3 commits intodotnet:mainfrom
EgorBo:jit/wide-simd-assertions

Conversation

@tannergooding
Copy link
Copy Markdown
Member

Alternative to #127390 which uses a heap allocation for SIMD values larger thatn TYP_SIMD16.

EgorBo and others added 3 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 20:19
@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
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

This PR extends JIT assertion propagation support for SIMD constants beyond TYP_SIMD16, enabling assertions and constant propagation for TYP_SIMD32/64 (and recognizing additional SIMD equality/inequality patterns).

Changes:

  • Extend AssertionDsc vector-constant storage to track SIMD payload size and support wider SIMD via arena allocation.
  • Update assertion creation/propagation to accept all SIMD constant types (TYP_SIMD8/12/16/32/64) and compare based on payload size.
  • Enable assertion generation for Vector256/Vector512 equality/inequality intrinsics in optAssertionGenJtrue.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/coreclr/jit/compiler.h Updates assertion descriptor vector-constant representation (size + inline/allocated payload) and equality logic.
src/coreclr/jit/assertionprop.cpp Expands assertion creation/propagation to all SIMD sizes and recognizes Vector256/512 EQ/NE patterns.

Comment thread src/coreclr/jit/compiler.h
@tannergooding
Copy link
Copy Markdown
Member Author

Had been hoping to just get SPMI numbers, but it wouldn't build and I didn't have permission to push; so #127402 is a PR from my repo where I could include the jit-format and arm build fixes

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