[libclc] [libclc] Fix fmod returning NaN for subnormal inputs (PR #225351)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 23 00:57:57 PDT 2026
Lurie97 wrote:
> More broadly, doing bithacking on any FP value should not be done. It's necessary in a narrow set of cases, and new bithacking shouldn't be necessary
>
> Should fix __clc_isfinite. Actually none of these cases using _CLC_DEFINE_ISFPCLASS probably probably should be using is_fpclass
Force-pushed to switch approach: instead of bit arithmetic inside fmod, this now
fixes __clc_isnan/isinf/isfinite to use ordinary comparisons, so is_fpclass is no
longer relied on and clc_fmod.cl is untouched. CTS math_brute_force fmod still
passes 2/2 (0.00 ulp) on the CL_FP_DENORM device.
https://github.com/llvm/llvm-project/pull/225351
More information about the cfe-commits
mailing list