[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 01:47:10 PDT 2025


frasercrmck wrote:

> I still have a few things to investigate to make sure of what is happening, but in the meantime would you guys approve to land this patch to make the implementation more stable whether the device supports denorm or not?
> 
> ```
> -   __CLC_INTN is_inf_nan_or_zero =
> -      x == __CLC_FP_LIT(0.0) || __clc_isinf(x) || __clc_isnan(x);
> +   __CLC_INTN is_inf_nan_or_zero =
> +      ai == (__CLC_INTN)0 || __clc_isinf(x) || __clc_isnan(x);
> ```

Fine by me, yep. It would be good to know what's going on so we can avoid these problems (if there are any) in the future.

https://github.com/llvm/llvm-project/pull/129871


More information about the cfe-commits mailing list