[libc-commits] [PATCH] D152459: [libc] Add Int<> type and fix (U)Int<128> compatibility issues.
Tue Ly via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Jun 8 13:55:40 PDT 2023
lntue added inline comments.
================
Comment at: libc/test/src/math/TruncTest.h:68
constexpr UIntType COUNT = 100'000;
- constexpr UIntType STEP = UIntType(-1) / COUNT;
+ const UIntType STEP = UIntType(-1) / COUNT;
for (UIntType i = 0, v = 0; i <= COUNT; ++i, v += STEP) {
----------------
sivachandra wrote:
> I did not do a detailed review but why were these `constexpr` decls converted to `const` decls?
Because these use the division operator, which using `clz()` internally, which in turn calls `__builtin_clz*` that are not `constexpr`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152459/new/
https://reviews.llvm.org/D152459
More information about the libc-commits
mailing list