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

Fix size used for vectorization check in BitArray (#111558) #111564

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ public unsafe void CopyTo(Array array, int index)
}
}
}
else if (Ssse3.IsSupported && ((uint)m_length >= Vector512<byte>.Count * 2u))
else if (Ssse3.IsSupported && ((uint)m_length >= Vector128<byte>.Count * 2u))
Copy link
Member

Choose a reason for hiding this comment

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

I think while you're on it, we can also replace various Sse2.And with just plain operators, e.g.

Vector128<byte> extractedLower = Sse2.And(shuffledLower, bitMask128);

to

Vector128<byte> extractedLower = shuffledLower & bitMask128;

but that's optional

{
Vector128<byte> lowerShuffleMask = lowerShuffleMask_CopyToBoolArray;
Vector128<byte> upperShuffleMask = upperShuffleMask_CopyToBoolArray;
Expand Down
Loading