[llvm] [ADT] Add llvm::countr_zero_constexpr (PR #164188)
    Kazu Hirata via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct 20 06:58:10 PDT 2025
    
    
  
================
@@ -151,7 +151,8 @@ template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>>
 /// Count the number of set bits in a value.
 /// Ex. popcount(0xF000F000) = 8
 /// Returns 0 if Value is zero.
-template <typename T> [[nodiscard]] inline int popcount(T Value) noexcept {
+template <typename T>
+[[nodiscard]] constexpr inline int popcount(T Value) noexcept {
----------------
kazutakahirata wrote:
Removed.
https://github.com/llvm/llvm-project/pull/164188
    
    
More information about the llvm-commits
mailing list