summaryrefslogtreecommitdiff
path: root/libc/test/src/__support/math_extras_test.cpp
AgeCommit message (Collapse)Author
2025-03-10[libc] Add `-Wno-sign-conversion` & re-attempt `-Wconversion` (#129811)Vinay Deshmukh
Relates to https://github.com/llvm/llvm-project/issues/119281#issuecomment-2699470459
2025-03-08[libc] `first_trailing_one(0)` should be `0`. (#130155)Connector Switch
Fix this minor bug. See more context at #129892.
2025-03-05Revert "[libc] Enable -Wconversion for tests. (#127523)"Augie Fackler
This reverts commit 1e6e845d49a336e9da7ca6c576ec45c0b419b5f6 because it changed the 1st parameter of adjust() to be unsigned, but libc itself calls adjust() with a negative argument in align_backward() in op_generic.h.
2025-03-04[libc] Enable -Wconversion for tests. (#127523)Vinay Deshmukh
Relates to: #119281
2024-07-12[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)Petr Hosek
This is a part of #97655.
2024-07-12Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace ↵Mehdi Amini
declaration" (#98593) Reverts llvm/llvm-project#98075 bots are broken
2024-07-11[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)Petr Hosek
This is a part of #97655.
2024-06-28[libc] Fix compilation error on targets without 128-bit int types (#97039)OverMighty
See Buildbot failures: - https://lab.llvm.org/buildbot/#/builders/11/builds/743 - https://lab.llvm.org/buildbot/#/builders/182/builds/362
2024-04-06[libc][NFC] Rename `UInt.h` to `big_int.h` and `UInt128.h` to `uint128.h` ↵Guillaume Chatelet
for consistency (#87808)
2024-04-04[reland][libc] Refactor `BigInt` (#87613)Guillaume Chatelet
This is a reland of #86137 with a fix for platforms / compiler that do not support trivially constructible int128 types.
2024-04-04Revert "[libc] Refactor `BigInt`" (#87612)Guillaume Chatelet
Reverts llvm/llvm-project#86137 Some aarch64 compilers seem to consider that `uint128_t` is not `is_trivially_constructible` which prevents `bit_cast`-ing.
2024-04-04[libc] Refactor `BigInt` (#86137)Guillaume Chatelet
This patch moves most of the multiprecision logic to the `multiword` namespace and simplifies some logic in `BigInt`. It also fully implements the mask and count functions and increases test coverage. `math_extras.h` is also reworked to make it more concise.
2024-03-27[libc][support][UInt] implement 128b math helpers (#86531)Nick Desaulniers
Flush out the remaining UInt<128> support and add test coverage. We could have used cpp::popcount in the implementation of UInt::has_single_bit, but has_single_bit has a perhaps useful early return.
2024-03-12[libc] move non <bit> functions to math_extras (#84818)Nick Desaulniers
As per TODOs added in https://github.com/llvm/llvm-project/pull/84035/commits/48b0bc837085a38ff1de33010d9222363f70238f.
2024-03-07[libc] Fix forward missing `BigInt` specialization of `mask_leading_ones` / ↵Guillaume Chatelet
`mask_trailing_ones` (#84325) #84299 broke the arm32 build, this patch fixes it forward.
2023-12-12[libc] Add mask functions to math_extras (#75169)Guillaume Chatelet
2023-11-23[libc][NFC] Split builtin_wrapper into bit and math_extras (#73113)Guillaume Chatelet
Split `builtin_wrapper.h` into `bit.h` and `math_extras.h` to mimic LLVM `llvm/ADT/Bit.h` and `llvm/Support/MathExtras.h`. Also added unittest place holders.