aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2022-09-04 21:21:32 +0200
committerAldy Hernandez <aldyh@redhat.com>2022-09-05 08:21:41 +0200
commit5f3228935e27780430a8a1504c2fa4a1ff978594 (patch)
treeb9c2c7417150a1c9e4fe2e046298357815c09a3e /libcpp
parent5e070cf4bd085e10601195bb223dd1a0edeecf4d (diff)
downloadgcc-5f3228935e27780430a8a1504c2fa4a1ff978594.zip
gcc-5f3228935e27780430a8a1504c2fa4a1ff978594.tar.gz
gcc-5f3228935e27780430a8a1504c2fa4a1ff978594.tar.bz2
Be even more conservative in intersection of NANs.
Intersecting two ranges where one is a NAN is keeping the sign bit of the NAN range. This is not correct as the sign bits may not match. I think the only time we're absolutely sure about the intersection of a NAN and something else, is when both are a NAN with exactly the same properties (sign bit). If we're intersecting two NANs of differing sign, we can decide later whether that's undefined or just a NAN with no known sign. For now I've done the latter. I'm still mentally working on intersections involving NANs, especially if we want to keep track of signbits. For now, let's be extra careful and only do things we're absolutely sure about. Later we may want to fold the intersect of [NAN,NAN] and say [3,5] with the posibility of NAN, to a NAN, but I'm not 100% sure. As I've said before, setting varying is always a safe choice, because it means we know nothing and ranger won't attempt to optimize anything. gcc/ChangeLog: * value-range.cc (early_nan_resolve): Remove. (frange::intersect): Handle NANs.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions