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: fix unused operand marking in LowerHWIntrinsicTernaryLogic #106574

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

github-actions[bot]
Copy link
Contributor

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

Backport of #106555 to release/9.0-rc1

/cc @AndyAyersMS

Customer Impact

  • Customer reported
  • Found internally

Found by Antigen (internal exploratory test generator).

Certain uses of AVX512F's Ternary Logic will lead to silent bad code generation.

Regression

  • Yes
  • No

Introduced fairly recently, in #104517.

Testing

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

We likely need to pay more attention in reviews and testing when considering code where operands can be swapped, as it's easy to lose track of which one is which.

Risk

Low. Only impacts a handful of AVX512-specific intrinsics. But note TernaryLogic lowers to a powerful new instruction (vpternlog{d,q}) and we are increasingly shaping our IR to take advantage of it, when running on AVX-512 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.

In `LowerHWIntrinsicTernaryLogic` we do some operand swapping and replacing,
and were not accounting for this when marking operands as unused.

Fixes #106480.
@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 17, 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

@jeffschwMSFT
Copy link
Member

@carlossanlop are we still considering rc1 fixes?

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
Copy link
Member

@carlossanlop are we still considering rc1 fixes?

It seems so. We just got two bad build breaks fixed today. So I guess we can take this today too. Has this been approved by Tactics? @AndyAyersMS @jeffschwMSFT

@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 19, 2024
@carlossanlop carlossanlop merged commit f028127 into release/9.0-rc1 Aug 19, 2024
98 of 102 checks passed
@carlossanlop carlossanlop deleted the backport/pr-106555-to-release/9.0-rc1 branch August 19, 2024 17:54
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 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