[llvm] Enable logf128 constant folding for hosts with 128bit long double (PR #104929)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 07:13:58 PDT 2024
================
@@ -1883,6 +1875,12 @@ class [[nodiscard]] APInt {
/// Returns whether this instance allocated memory.
bool needsCleanup() const { return !isSingleWord(); }
+ /// Get the word corresponding to a bit position
+ /// \returns the corresponding word for the specified bit position.
+ uint64_t getWord(unsigned bitPosition) const {
----------------
davemgreen wrote:
Would it be possible to avoid adding this by using `LowHalf == APInt.getWord(0) == APint.trunc(64).getZExtValue()` and `HighHalf == APInt.getWord(64) == APInt.lshr(64).trunc(64).getZExtValue()`
https://github.com/llvm/llvm-project/pull/104929
More information about the llvm-commits
mailing list