This is an archive of the discontinued LLVM Phabricator instance.

Enable constexpr on BITREVERSE builtin intrinsics (PR47249)
ClosedPublic

Authored by RKSimon on Aug 21 2020, 4:14 AM.

Details

Summary

This enables us to use the __builtin_bitreverse 8/16/32/64 intrinsics inside constexpr code.

Diff Detail

Event Timeline

RKSimon created this revision.Aug 21 2020, 4:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2020, 4:14 AM
RKSimon requested review of this revision.Aug 21 2020, 4:14 AM
erichkeane accepted this revision.Aug 21 2020, 10:59 AM

This looks right to me.

This revision is now accepted and ready to land.Aug 21 2020, 10:59 AM

Can you also add documentation to LanguageExtensions.rst? Thanks!

clang/docs/ReleaseNotes.rst
65

There's no such thing as a "constexpr expression". The right term is "constant expressions".