[libclc] libclc: frexp: fix implementation regarding denormals (PR #134823)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 8 03:18:34 PDT 2025
================
@@ -26,7 +26,7 @@ __clc_frexp(__CLC_GENTYPE x, __CLC_ADDRESS_SPACE __CLC_INTN *ep) {
(ai & (__CLC_INTN)MANTBITS_SP32);
__CLC_INTN is_inf_nan_or_zero =
- x == __CLC_FP_LIT(0.0) || __clc_isinf(x) || __clc_isnan(x);
+ ai == (__CLC_INTN)0 || __clc_isinf(x) || __clc_isnan(x);
----------------
frasercrmck wrote:
I know this was in the original code that we're essentially reverting to, but do we know this is correct for `-0.0`?
https://github.com/llvm/llvm-project/pull/134823
More information about the cfe-commits
mailing list