[NFC][compiler-rt] Use __builtin_huge_val for CRT_INFINITY for double precision (#188197)

This commit is contained in:
jinge90 2026-03-31 16:31:15 -07:00 committed by GitHub
parent bf50489eeb
commit 3f2a9c6f54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -31,8 +31,12 @@
#if defined(_MSC_VER) && !defined(__clang__)
#define CRT_INFINITY INFINITY
#else
#if defined(DOUBLE_PRECISION)
#define CRT_INFINITY __builtin_huge_val()
#else
#define CRT_INFINITY __builtin_huge_valf()
#endif
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#define crt_isfinite(x) _finite((x))

View File

@ -10,6 +10,7 @@
//
//===----------------------------------------------------------------------===//
#define DOUBLE_PRECISION
#include "int_lib.h"
#include "int_math.h"