[libclc] [libclc] Reduce bithacking for INF/NAN values (PR #129738)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 5 08:36:31 PST 2025
================
@@ -46,9 +46,7 @@ _CLC_DEF _CLC_OVERLOAD __CLC_GENTYPE __clc_hypot(__CLC_GENTYPE x,
__CLC_GENTYPE retval = __clc_sqrt(__clc_mad(fx, fx, fy * fy)) * fx_exp;
retval = (ux > PINFBITPATT_SP32 || uy == 0) ? __CLC_AS_GENTYPE(ux) : retval;
- retval = (ux == PINFBITPATT_SP32 || uy == PINFBITPATT_SP32)
- ? __CLC_AS_GENTYPE((__CLC_UINTN)PINFBITPATT_SP32)
- : retval;
+ retval = __clc_isinf(x) || __clc_isinf(y) ? __CLC_GENTYPE_INF : retval;
----------------
arsenm wrote:
AMDGPU instructions names call them frexp_exp and frexp_mant. It's just the two parts of the frexp, split into 2 instructions.
ldexp is just ldexp, there's nothing special to it
https://github.com/llvm/llvm-project/pull/129738
More information about the cfe-commits
mailing list