aboutsummaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2024-07-08 14:56:19 -0500
committerJoseph Huber <huberjn@outlook.com>2024-07-08 15:02:05 -0500
commitd358151a4fe94c72186d58f8903f044a116d0fa8 (patch)
treea10dff27d21b312f2c7888b8d552435e83d4081b /libc/include
parentf5ee07a1b5ca6f337e6b4a46558c315b8ccd29dc (diff)
downloadllvm-d358151a4fe94c72186d58f8903f044a116d0fa8.zip
llvm-d358151a4fe94c72186d58f8903f044a116d0fa8.tar.gz
llvm-d358151a4fe94c72186d58f8903f044a116d0fa8.tar.bz2
Reapply "[libc] Make GPU `libm` use generic implementations" (#98061)
This reverts commit ea3fd020f4879d5b4261eabd9a56c24f30bc47f9.
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/llvm-libc-macros/math-macros.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/libc/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h
index 4783896..efecdf1 100644
--- a/libc/include/llvm-libc-macros/math-macros.h
+++ b/libc/include/llvm-libc-macros/math-macros.h
@@ -41,12 +41,10 @@
#define FP_LLOGBNAN LONG_MAX
#endif
-#ifdef __FAST_MATH__
+#if defined(__NVPTX__) || defined(__AMDGPU__) || defined(__FAST_MATH__)
#define math_errhandling 0
#elif defined(__NO_MATH_ERRNO__)
#define math_errhandling (MATH_ERREXCEPT)
-#elif defined(__NVPTX__) || defined(__AMDGPU__)
-#define math_errhandling (MATH_ERRNO)
#else
#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
#endif