-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[Clang] Support elementwise/reduction builtins in constexpr contexts. #51787
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
Comments
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 |
This issue was submitted some time ago, but it looks like no one has claimed it, so I will make an attempt to contribute here. |
@dlumma Any progress? |
@dlumma reverse-ping |
When investigating this issue, I discovered that certain scalar versions of these functions, like By the way, could you please help reviewing #113020 when you have time? Thank you! @RKSimon |
@c8ef Are you interested in working on this for at least the integer cases? |
Yes, I have a draft patch for this. I will start with BTW, what do you think of the latest revision in #114637? I only modified the parameter documentation and kept the nan semantics. I noticed the problem while working on this issue. |
Great, would be great to close the gap between integer and FP support in the builtins! |
Part of #51787. This patch adds constexpr support for the built-in reduce add function. If this is the right way to go, I will add support for other reduce functions in later patches. --------- Co-authored-by: Mariya Podchishchaeva <[email protected]>
Part of #51787. This patch adds constexpr support for the built-in elementwise popcount function.
Part of #51787. This patch adds constexpr support for the built-in elementwise bitreverse function.
@c8ef For integer reductions we're just missing min/max coverage - are you still able to work on this? |
Yes, will do. |
@llvm/issue-subscribers-clang-frontend Author: Florian Hahn (fhahn)
| | |
| --- | --- |
| Bugzilla Link | [52445](https://llvm.org/bz52445) |
| Version | trunk |
| OS | All |
| CC | @DougGregor,@RKSimon,@zygoloid |
Extended DescriptionClang recently specified a set of builtins for elementwise operations and reductions on vectors: https://clang.llvm.org/docs/LanguageExtensions.html#vector-builtins They should also be supported in constexpr contexts. |
Part of #51787. This patch adds constexpr support for the built-in reduce min/max function.
It's also helpful for C++26 |
I'm wondering if |
Extended Description
Clang recently specified a set of builtins for elementwise operations and reductions on vectors:
https://clang.llvm.org/docs/LanguageExtensions.html#vector-builtins
They should also be supported in constexpr contexts.
The text was updated successfully, but these errors were encountered: