]> gcc.gnu.org Git - gcc.git/commit
Fix up foperator_abs::op1_range [PR107569]
authorJakub Jelinek <jakub@redhat.com>
Wed, 9 Nov 2022 12:07:32 +0000 (13:07 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 9 Nov 2022 12:07:32 +0000 (13:07 +0100)
commitd943927ff860cea44a9cf64fc6d591a4a6e37f6f
treead2e8a1cabd47be9eceab84234b6b0ce6be282f3
parentd05a423c1e7b81021a1b6bee93db31a903d87667
Fix up foperator_abs::op1_range [PR107569]

foperator_abs::op1_range works except for the NaN handling,
from:
[frange] double [-Inf, 1.79769313486231570814527423731704356798070567525844996599e+308 (0x0.fffffffffffff8p+1024)]
lhs it computes r
[frange] double [-1.79769313486231570814527423731704356798070567525844996599e+308 (-0x0.fffffffffffff8p+1024), 1.79769313486231570814527423731704356798070567525844996599e+308
+(0x0.fffffffffffff8p+1024)] +-NAN
which is correct except for the +-NAN part.
For r before the final step it makes sure to add -NAN if there is +NAN
in the lhs range, but the final r.union_ makes it unconditional +-NAN,
because the frange ctor sets +-NAN.
So, I think we need to clear it (or have some set variant which
says not to set NAN).

This patch fixes that, but isn't enough to fix the PR, something in
the assumptions handling is still broken (and the PR has other parts).

2022-11-09  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/107569
* range-op-float.cc (foperator_abs::op1_range): Clear NaNs
from the negatives frange before unioning it into r.
gcc/range-op-float.cc
This page took 0.05587 seconds and 5 git commands to generate.