-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Some builtin intrinsics that are not constexpr but could be #46593
Comments
https://reviews.llvm.org/D86339 - __builtin_bitreverse support |
https://reviews.llvm.org/D86342 - __builtin_rotateleft / __builtin_rotateright support |
|
|
Also |
Feels like a good first issue. |
Agreed although they need splitting into separate tasks - the ms-extension variants are pretty trivial, but convertvector might be harder and I expect shufflevector to be tricky. |
@RKSimon Looking at the PRs above they look relatively straight forward. |
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
For more instructions on how to submit a patch to LLVM, see our documentation. If you have any further questions about this issue, don't hesitate to ask via a comment on this Github issue. @llvm/issue-subscribers-good-first-issue |
Hi, seems like the ROTL/ROTR ms-extension intrinsics were already made constexpr in a1dc3d2. I would like to work on the remaining intrinsics. |
Great - I'd recommend starting with the the lzcnt/popcnt ms-extension intrinsics as they should be similar to the previous cases. After that, __builtin_convertvector is probably easier than __builtin_shufflevector but both are very different to the other intrinsics, and will require some refactoring for missing vector type special case handling. |
Submitted a patch for lzcnt/popcnt https://reviews.llvm.org/D157420 |
I'm on it: D156156. I'll try to find time to finish it this week. |
Also #51787 (elementwise and reduction builtins) |
As discussed on #46593 - this enables us to use __lzcnt / __popcnt intrinsics inside constexpr code. Differential Revision: https://reviews.llvm.org/D157420
Could I take the last two missing expressions? |
It does not look like anyone is currently working on them, so I can assign this to you if you want. |
Thank you, I'll take it then! |
@Destroyerrrocket Go for it! I'd recommend you start with |
Hi! I've made the changes for both intrinsics here: #76615 |
Yes, we moved over to GitHub PRs since that comment was posted. |
Closing - __builtin_shufflevector and __builtin_convertvector were handled in #76615 |
This isn't exhaustive, but all are low hanging fruit:
bit twiddling:
__builtin_bitreverse
D86339 e7d9182__builtin_rotateleft
D86342 2ceac91__builtin_rotateright
D86342 2ceac91vectors:
__builtin_convertvector
__builtin_shufflevector
-fms-extensions variants:
__lzcnt16
,__lzcnt
,__lzcnt64
D157420 00158ae__popcnt16
,__popcnt
,__popcnt64
D157420 00158ae_rotl8
,_rotl16
,_rotl
,_rotl64
,_lrotl
_rotr8
,_rotr16
,_rotr
,_rotr64
,_lrotr
The text was updated successfully, but these errors were encountered: