[PATCH] D107240: [LLVM][NFC] Make multiple bitwise MathExtras functions constexpr
Alf via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 10:45:21 PDT 2021
gAlfonso-bit added inline comments.
================
Comment at: llvm/include/llvm/Support/MathExtras.h:116
-#if defined(__GNUC__) || defined(_MSC_VER)
+#if defined(_MSC_VER) || __has_builtin(__builtin_ctz) || defined(__GNUC__)
+
----------------
craig.topper wrote:
> Doesn't this mean that users of this that want to use it in constexpr can't compile that code with MSVC and would need a different solution just for MSVC? Is that useful for the project?
No, since people who want to use it with constexpr but can't already exist, but this group gets smaller. Hopefully Microsoft finds a way, but there are downstream projects that would benefit from this already, like Swift.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107240/new/
https://reviews.llvm.org/D107240
More information about the llvm-commits
mailing list