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

Add a var_types_classification for simd #82616

Merged
merged 2 commits into from
Feb 24, 2023

Conversation

tannergooding
Copy link
Member

No description provided.

@ghost ghost assigned tannergooding Feb 24, 2023
template <class T>
inline bool varTypeIsSIMD(T vt)
{
#ifdef FEATURE_SIMD
return ((varTypeClassification[TypeGet(vt)] & VTF_VEC) != 0);
Copy link
Member Author

Choose a reason for hiding this comment

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

An alternative would be: return (TypeGet(vt) >= TYP_SIMD8) && (TypeGet(vt) <= TYP_SIMD32);

I'd expect varTypeClassification to typically be cached though, so I'm operating under the assumption a new classification is "better".

@BruceForstall
Copy link
Member

Excellent! I've been wondering about this.

@tannergooding
Copy link
Member Author

tannergooding commented Feb 24, 2023

This represents a -0.31% to -0.92% TP improvement: https://dev.azure.com/dnceng-public/public/_build/results?buildId=183835&view=ms.vss-build-web.run-extensions-tab

CC. @dotnet/jit-contrib

@tannergooding tannergooding marked this pull request as ready for review February 24, 2023 20:01
@tannergooding tannergooding merged commit f11bb5a into dotnet:main Feb 24, 2023
@tannergooding tannergooding deleted the simd-class branch February 24, 2023 20:39
@ghost ghost locked as resolved and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants