[llvm] [ValueTracking] Fix frexp exponent range for nan/inf inputs (PR #202447)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 00:46:10 PDT 2026
arsenm wrote:
> Interesting, it seems like musl's `frexp` doesn't even write out the exponent in the non-finite case, which could lead to non-deterministic results: https://git.musl-libc.org/cgit/musl/tree/src/math/frexp.c#n16
>
> while glibc always writes out a `0`: https://github.com/bminor/glibc/blob/04e750e75b73957cf1c791535a3f4319534a52fc/sysdeps/ieee754/dbl-64/s_frexp.c#L40
IIRC C does not specify the result for inf/nan for the exponent, but OpenCL is stricter and requires a 0
https://github.com/llvm/llvm-project/pull/202447
More information about the llvm-commits
mailing list