[libc-commits] [libc] [libc] Prevent constant propagation for atanf(+-Inf) in gcc. (PR #85733)

via libc-commits libc-commits at lists.llvm.org
Tue Mar 19 08:39:18 PDT 2024


lntue wrote:

> Is there something pertaining to rounding modes at runtime resulting in different values than the rounding used during constant propagation?

As an example in this patch, casting double precision `pi/2` to single precision results in different values depending on the rounding mode at runtime.  So if that cast is constant folded, regardless of which rounding mode was chosen, the result will be wrong in some other rounding mode at runtime.

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


More information about the libc-commits mailing list