Skip to content

Arm64 SVE: Fix conditionalselect with constant arguments #116852

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

a74nh
Copy link
Contributor

@a74nh a74nh commented Jun 20, 2025

Fixes #116847

When folding, allow arg1 to be a constant mask

Fixes dotnet#116847

When folding, allow arg1 to be a constant mask
@a74nh a74nh marked this pull request as ready for review June 20, 2025 10:46
@a74nh
Copy link
Contributor Author

a74nh commented Jun 20, 2025

@dotnet/arm64-contrib @kunalspathak

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 20, 2025
@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 Jun 20, 2025
Copy link
Contributor

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

@kunalspathak
Copy link
Member

/azp run Antigen, Fuzzlyn

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

}

#if defined(TARGET_XARCH)
case TYP_SIMD32:
Copy link
Member

Choose a reason for hiding this comment

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

so we are just adding this even though xarch is not exercising this path?

{
switch (gtType)
{
case TYP_SIMD8:
Copy link
Member

Choose a reason for hiding this comment

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

I don't see why we would come in TYP_SIMD8 and TYP_SIMD16 for Mask constants?

// depending on if the corresponding input element
// has its least significant bit set

bool isSet = static_cast<uint64_t>(1) << (i * sizeof(TBase));
Copy link
Member

Choose a reason for hiding this comment

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

wait, we should be check isSet with content of input0, right?

// depending on if the corresponding input element
// has its least significant bit set

bool isSet = static_cast<uint64_t>(1) << (i * sizeof(TBase));
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

There is a bug in EvaluateSimdVectorToPattern where we are not validating it against the contents of arg0.

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 community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arm64 SVE: Error when ConditionalSelect has all constant arguments
2 participants