[libclc] [libclc] Fix exponent overflow and subnormal rounding in __clc_ldexp (PR #233823)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 23 01:19:36 PDT 2026
================
----------------
wenju-he wrote:
Simplify these 4 lines using add-half-minus-one rounding trick: `val_ui = (full_mant + ((1u << (ex1 - 1)) - 1u) + ((full_mant >> ex1) & 1u)) >> ex1;`? This should produce fewer instructions.
https://github.com/llvm/llvm-project/pull/233823
More information about the cfe-commits
mailing list