[compiler-rt] Add extendhfxf2 into compiler rt (PR #113897)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 11:18:11 PST 2024


================
@@ -0,0 +1,18 @@
+//===-- lib/extendhfxf2.c - half -> long double conversion --------*- C -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#define SRC_HALF
+#define DST_DOUBLE
----------------
arichardson wrote:

I guess this works fine since you are doing an explicit double->long double extension and I think all hf values should be representable.

I do wonder if it would be cleaner to update fp_extend.h to handle DST_80 instead and do the following:
```suggestion
#define DST_80
```


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


More information about the llvm-commits mailing list