Skip to content

Sve2 AddHighNarrowing (Upper/Lower) #116848

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 3 commits into
base: main
Choose a base branch
from

Conversation

jacob-crawley
Copy link
Contributor

@a74nh @kunalspathak

Contributing towards #115479

@@ -3564,7 +3564,6 @@ void emitter::emitInsSve_R_R_R(instruction ins,
case INS_sve_subhnt:
case INS_sve_rsubhnb:
case INS_sve_rsubhnt:
unreached(); // TODO-SVE: Not yet supported.
Copy link
Member

Choose a reason for hiding this comment

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

why is this removed? We added this because we couldn't verify the disasm and encoding. Please verify if this works by setting DOTNET_JitEmitUnitTestsSections=sve

@@ -445,7 +443,7 @@ namespace JIT.HardwareIntrinsics.Arm
{
{RetBaseType}[] mask = new {RetBaseType}[RetElementCount];
{Op1BaseType}[] left = new {Op1BaseType}[Op1ElementCount];
{Op1BaseType}[] right = new {Op1BaseType}[Op1ElementCount];
{Op2BaseType}[] right = new {Op2BaseType}[Op1ElementCount];
Copy link
Member

@kunalspathak kunalspathak Jun 20, 2025

Choose a reason for hiding this comment

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

Suggested change
{Op2BaseType}[] right = new {Op2BaseType}[Op1ElementCount];
{Op2BaseType}[] right = new {Op2BaseType}[Op2ElementCount];

@@ -195,11 +193,9 @@ namespace JIT.HardwareIntrinsics.Arm
Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>());
for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; }
Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>());
for (var i = 0; i < RetElementCount; i++) { _maskData[i] = ({RetBaseType})_data1[i];}
Copy link
Member

Choose a reason for hiding this comment

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

why is this change? Since _trueFld and _falseFld are masks, they should be populated from _maskData. Also, _trueFld does not even have all true, so wondering why we decided to rename it?

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.

added some comments around test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Runtime.Intrinsics 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.

2 participants