Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/9.0-rc1] JIT: update simd base type when combining simd nodes for bitwise ops #106520

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 16, 2024

Backport of #106510 to release/9.0-rc1

/cc @AndyAyersMS

Customer Impact

  • Customer reported
  • Found internally

Found by Antigen (internal exploratory test generator).

Certain patterns of Vector512 usage will lead to unexpected failures like

Process terminated. InternalError
   at System.Environment.FailFast(System.Runtime.CompilerServices.StackCrawlMarkHandle, System.String, System.Runtime.CompilerServices.ObjectHandleOnStack, System.String)
   at System.Environment.FailFast(System.Threading.StackCrawlMark ByRef, System.String, System.Exception, System.String)
   at System.Environment.FailFast(System.String)
   at System.Runtime.EH.FallbackFailFast(System.Runtime.RhFailFastReason, System.Object)
   at System.Runtime.EH.RhThrowHwEx(UInt32, ExInfo ByRef)

Regression

  • Yes
  • No

Looks like this was introduced recently, by #104517.

Testing

While we generally have good coverage for HW intrinsics used in isolation, the combinatorics for HW intrinsics are unfavorable (thousands of intrinsics --> millions of pairs, billions of triples, etc). Antigen and similar tools attempt to explore the space of composition to a certain degree.

The fix was validated on the Antigen test case, and that case is now included in our regression suite.

Risk

Low. Only impacts a specific pattern of intrinsics when running on AVX-512 capable hardware.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

If we merge two simd for bitwise ops (eg creating an AndNot), make sure to use
the simd base type of the parent (And) node when specializing the operator.

Fixes #106478.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 16, 2024
Copy link
Contributor

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

@AndyAyersMS
Copy link
Member

@tannergooding PTAL
cc @dotnet/jit-contrib

FYI @jeffschwMSFT

@AndyAyersMS
Copy link
Member

AndyAyersMS commented Aug 16, 2024

Failure looks like #106494, not sure why build analysis isn't picking this up. (guess it is, and it's red waiting for servicing-approved? this is a little confusing)

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

lgtm. we will take for consideration in rc1

@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 16, 2024
@carlossanlop
Copy link
Member

Approved by Tactics via email.

@carlossanlop carlossanlop merged commit d649039 into release/9.0-rc1 Aug 16, 2024
95 of 101 checks passed
@carlossanlop carlossanlop deleted the backport/pr-106510-to-release/9.0-rc1 branch August 16, 2024 17:42
@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants