aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-11-09 14:31:13 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-11-09 14:54:29 +0000
commitff4bfb1553cf525d7299bbf7451ac32cfd97ae1b (patch)
tree07818d3dc0f190349ee1a4d7a22c41f56594fbc6
parent96f315213f337c2d5a9268f2d3e8337bbdb71bfc (diff)
downloadgcc-ff4bfb1553cf525d7299bbf7451ac32cfd97ae1b.zip
gcc-ff4bfb1553cf525d7299bbf7451ac32cfd97ae1b.tar.gz
gcc-ff4bfb1553cf525d7299bbf7451ac32cfd97ae1b.tar.bz2
libstdc++: Remove redundant check for zero in std::__popcount
The popcount built-ins work fine for zero, so there's no need to check for it. libstdc++-v3/ChangeLog: * include/std/bit (__popcount): Remove redundant check for zero.
-rw-r--r--libstdc++-v3/include/std/bit3
1 files changed, 0 insertions, 3 deletions
diff --git a/libstdc++-v3/include/std/bit b/libstdc++-v3/include/std/bit
index f434482..16f7eba 100644
--- a/libstdc++-v3/include/std/bit
+++ b/libstdc++-v3/include/std/bit
@@ -184,9 +184,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using __gnu_cxx::__int_traits;
constexpr auto _Nd = __int_traits<_Tp>::__digits;
- if (__x == 0)
- return 0;
-
constexpr auto _Nd_ull = __int_traits<unsigned long long>::__digits;
constexpr auto _Nd_ul = __int_traits<unsigned long>::__digits;
constexpr auto _Nd_u = __int_traits<unsigned>::__digits;