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] Fix optimization of Vector512 AndMask + NotMask to AndNotMask #108803

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 11, 2024

Backport of #108775 to release/9.0

/cc @BruceForstall

Customer Impact

  • Customer reported
  • Found internally

Found by fuzz testing. The bug causes either bad code generation or JIT crash in a specific case of optimizing Vector512 "and" and "not" on masks to the combined "AndNotMask" on AVX-512 machines.

For example:

(user code:) Vector512.AndNot(Vector512.Equals(v1, v2), Vector512.Equals(v3, v4))
=> (internally) AndMask(m1, NotMask(m2))
=> (internally) AndNotMask(m2, m1)

This internal transformation fails with this bug.

Regression

  • Yes
  • No

I believe this is not a regression, but represents a test hole.

Testing

Reduced fuzzing test used to verify. Created a small test based on this to verify, and add to the regression tests as part of this change.

Risk

Low. Very simple, isolated fix.

@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 Oct 11, 2024
@BruceForstall
Copy link
Member

@tannergooding @dotnet/jit-contrib PTAL

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. please get a code review. we will take for consideration in 9 GA

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Oct 14, 2024
@jeffschwMSFT jeffschwMSFT added this to the 9.0.0 milestone Oct 14, 2024
@BruceForstall BruceForstall changed the title [release/9.0] Fix optimization of Vector512 And + Not to AndNot [release/9.0] Fix optimization of Vector512 AndMask + NotMask to AndNotMask Oct 14, 2024
@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 14, 2024
@carlossanlop carlossanlop merged commit 4b745e0 into release/9.0 Oct 14, 2024
98 of 103 checks passed
@carlossanlop carlossanlop deleted the backport/pr-108775-to-release/9.0 branch October 14, 2024 20:16
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 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