[llvm] Constant Fold Logf128 calls (PR #84501)

Matthew Devereau via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 10:23:56 PDT 2024


================
@@ -1688,6 +1696,16 @@ class [[nodiscard]] APInt {
     return APInt(sizeof(float) * CHAR_BIT, llvm::bit_cast<uint32_t>(V));
   }
 
+#ifdef __FLOAT128__
+  static APInt longDoubleToBits(float128 V) {
----------------
MDevereau wrote:

I agree, but I can't think of a better way to do this currently since logf128 isn't available on all targets but is the only type that guarantees a floating-point type of 128 bits.

https://github.com/llvm/llvm-project/pull/84501


More information about the llvm-commits mailing list