diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-08-20 12:41:27 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-08-23 12:17:09 +0200 |
commit | ca1715ba544e20a85c8423094a18562359d0309d (patch) | |
tree | fd66224baa78ea019523479a32fb1b2254d59c6e /gcc/range-op-float.cc | |
parent | 200baf7698a1006714af27f2bfba6fad5607efb2 (diff) | |
download | gcc-ca1715ba544e20a85c8423094a18562359d0309d.zip gcc-ca1715ba544e20a85c8423094a18562359d0309d.tar.gz gcc-ca1715ba544e20a85c8423094a18562359d0309d.tar.bz2 |
Copy range from op2 in foperator_equal::op1_range.
Like the integer version, when op1 == op2 is known to be true the
ranges are also equal.
gcc/ChangeLog:
* range-op-float.cc (foperator_equal::op1_range): Set range to
range of op2.
Diffstat (limited to 'gcc/range-op-float.cc')
-rw-r--r-- | gcc/range-op-float.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index 4fbd96a..ad2fae5 100644 --- a/gcc/range-op-float.cc +++ b/gcc/range-op-float.cc @@ -252,7 +252,8 @@ foperator_equal::op1_range (frange &r, tree type, switch (get_bool_state (r, lhs, type)) { case BRS_TRUE: - r.set_varying (type); + // If it's true, the result is the same as OP2. + r = op2; // The TRUE side of op1 == op2 implies op1 is !NAN. r.set_nan (fp_prop::NO); break; |