diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-09-05 20:06:30 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-09-05 22:16:14 +0200 |
commit | 5f895f22173d78c1995a001d721d2ae1d075797b (patch) | |
tree | 93892fb147b0280e2b7d62256c6f45a0d0bb5ec8 /libcpp | |
parent | 1de9aa45529a98a5760a21570b181b78dbd11b3c (diff) | |
download | gcc-5f895f22173d78c1995a001d721d2ae1d075797b.zip gcc-5f895f22173d78c1995a001d721d2ae1d075797b.tar.gz gcc-5f895f22173d78c1995a001d721d2ae1d075797b.tar.bz2 |
Do not fold __builtin_signbit if NAN is a possibility.
I had some queued up work to try harder to keep the sign bit up to
date in the presence of NANs, but after the discussion with Richi
regarding the representation of NAN and signs in the frange, I've
decided to put it aside until after Cauldron, since it'll probably get
rewritten anyhow. So for now, the sign property in the frange is not
applicable to NANs.
Right now the only user of the sign bit that affects generated code
(apart from signed zeros) is __builtin_sign, so I'm just checking for
NAN there. Signed zeros continue working as before.
Regstrapped and mpfr checked on x86-64 Linux.
gcc/ChangeLog:
* gimple-range-fold.cc
(fold_using_range::range_of_builtin_int_call): Ignore sign bit
when there's the possibility of a NAN.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions