KEMBAR78
Add a var_types_classification for simd by tannergooding · Pull Request #82616 · dotnet/runtime · GitHub
Skip to content

Conversation

@tannergooding
Copy link
Member

No description provided.

@ghost ghost assigned tannergooding Feb 24, 2023
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
Contributor

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