[llvm] [RFC][SPIR-V] Add intrinsics to convert to/from ap.float (PR #164252)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 8 15:05:10 PST 2026


================
@@ -407,6 +407,11 @@ class APFloatBase {
   /// Returns the size of the floating point number (in bits) in the given
   /// semantics.
   LLVM_ABI static unsigned getSizeInBits(const fltSemantics &Sem);
+
+  /// Returns true if the given string is a valid arbitrary floating-point
+  /// format interpretation for llvm.convert.to.arbitrary.fp and
+  /// llvm.convert.from.arbitrary.fp intrinsics.
+  LLVM_ABI static bool isValidArbitraryFPFormat(StringRef Format);
----------------
kuhar wrote:

can we get a unit test for this?

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


More information about the llvm-commits mailing list