RISC-V / GCC 10: invalid operation not set in acos and asin
Joseph Myers
joseph@codesourcery.com
Wed May 13 20:20:44 GMT 2020
On Wed, 13 May 2020, Adhemerval Zanella via Libc-alpha wrote:
> Is is an invalid optimization? Because:
>
> double foo (double x)
> {
> x = NAN;
> x = x / x;
> return x;
> }
Optimizing away NAN / NAN is valid, because that doesn't raise any
exceptions. Optimizing away 0.0 / 0.0 or INFINITY / INFINITY isn't,
because that should raise "invalid".
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list