Skip to content

[libc++] Extend is_trivially_equality_comparable to integral types with the same signedness and size #70344

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

Merged

Conversation

philnik777
Copy link
Contributor

@philnik777 philnik777 commented Oct 26, 2023

This enables all optimizations that rely on is_trivially_equality_comparable to work with these integral types, for example std::equal and std::find.

@philnik777 philnik777 requested a review from a team as a code owner October 26, 2023 15:22
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Oct 26, 2023
@ldionne ldionne changed the title [libc++] Extend is_trivially_equality_comparable to integral types with the same signdness and size [libc++] Extend is_trivially_equality_comparable to integral types with the same signedness and size Oct 26, 2023
Copy link
Member

@ldionne ldionne left a comment

Choose a reason for hiding this comment

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

LGTM with added tests and CI passing.

@philnik777 philnik777 force-pushed the extend_is_trivially_equality_comparable branch from c63e76b to e75a94a Compare November 1, 2023 22:41
@philnik777 philnik777 force-pushed the extend_is_trivially_equality_comparable branch from e75a94a to 26d5852 Compare November 13, 2023 09:55
@philnik777 philnik777 merged commit b25d36c into llvm:main Nov 15, 2023
@philnik777 philnik777 deleted the extend_is_trivially_equality_comparable branch November 15, 2023 22:40
zahiraam pushed a commit to zahiraam/llvm-project that referenced this pull request Nov 20, 2023
…th the same signedness and size (llvm#70344)

This enables all optimizations that rely on
`is_trivially_equality_comparable` to work with these integral types,
for example `std::equal` and `std::find`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants