Skip to content

Ensure VN produces correctly initialized simdmask_t #115227

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

Merged
merged 4 commits into from
May 2, 2025

Conversation

tannergooding
Copy link
Member

This resolves #114978

@Copilot Copilot AI review requested due to automatic review settings May 1, 2025 17:10
@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 May 1, 2025
Copy link
Contributor

@Copilot 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 fixes issue #114978 by ensuring that the simdmask_t is correctly initialized with the proper element count. The changes include updating the signature and call sites of VNAllBitsForType, modifying the simdmask_t::AllBitsSet method to accept an elementCount, and adding a test to validate these changes.

Reviewed Changes

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

File Description
src/tests/JIT/Regression/JitBlue/Runtime_114978/Runtime_114978.cs Adds a regression test to verify the correct simdmask_t initialization
src/coreclr/jit/valuenum.h Updates the VNAllBitsForType signature by adding an unsigned elementCount parameter
src/coreclr/jit/valuenum.cpp Propagates the elementCount parameter in calls to VNAllBitsForType in various evaluation functions
src/coreclr/jit/simd.h Changes the AllBitsSet method to require an elementCount and returns the correctly initialized simdmask_t
Files not reviewed (1)
  • src/tests/JIT/Regression/JitBlue/Runtime_114978/Runtime_114978.csproj: Language not supported

Copy link
Contributor

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

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

Run outerloop + Fuzzlyn CI?

@@ -690,7 +690,7 @@ class ValueNumStore

// Returns the value number for AllBitsSet of the given "typ".
// It has an unreached() for a "typ" that has no all bits set value, such as TYP_VOID.
ValueNum VNAllBitsForType(var_types typ);
ValueNum VNAllBitsForType(var_types typ, unsigned elementCount);
Copy link
Member

Choose a reason for hiding this comment

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

Document elementCount?

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

I added a description for it matching the existing format since none of the other methods in here are following the more "standard" method documentation format.

It might be desirable to normalize that later, but I went for consistency now.

@tannergooding

This comment was marked as outdated.

This comment was marked as outdated.

@tannergooding
Copy link
Member Author

/azp run runtime-coreclr outerloop, fuzzlyn

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@tannergooding
Copy link
Member Author

/azp run runtime-coreclr outerloop, fuzzlyn

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@tannergooding tannergooding merged commit 828dec9 into dotnet:main May 2, 2025
170 of 174 checks passed
@tannergooding tannergooding deleted the fix-114978 branch May 2, 2025 16:11
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.

JIT: Avx512BW Compare Debug/Release difference
2 participants