[libc-commits] [libc] [libc][math] Temporarily disable nexttowardf16 on aarch64 due to clang-11 bug. (PR #94569)

via libc-commits libc-commits at lists.llvm.org
Wed Jun 5 21:48:05 PDT 2024


https://github.com/lntue created https://github.com/llvm/llvm-project/pull/94569

The conversion between _Float16 and long double will crash clang-11 on aarch64. This is fixed in clang-12: https://godbolt.org/z/8ceT9454c

>From c519f73a14a13a8b0a77cf23f008c55fb08d381a Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue at google.com>
Date: Thu, 6 Jun 2024 00:45:40 -0400
Subject: [PATCH] [libc][math] Temporarily disable nexttowardf16 on aarch64 due
 to clang-11 bug.

The conversion between _Float16 and long double will crash clang-11 on aarch64.
This is fixed in clang-12: https://godbolt.org/z/8ceT9454c
---
 libc/config/linux/aarch64/entrypoints.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index a8cb468b3cba9..13a4445aca76b 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -516,7 +516,10 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.nearbyintf16
     libc.src.math.nextafterf16
     libc.src.math.nextdownf16
-    libc.src.math.nexttowardf16
+    # Temporarily disable nexttowardf16 on aarch64 because the conversion
+    # between _Float16 and long double will crash clang-11.  This is fixed in
+    # clang-12 and after: https://godbolt.org/z/8ceT9454c
+    # libc.src.math.nexttowardf16
     libc.src.math.nextupf16
     libc.src.math.rintf16
     libc.src.math.roundf16



More information about the libc-commits mailing list