From: Aldy Hernandez Date: Sat, 20 Aug 2022 10:41:27 +0000 (+0200) Subject: Copy range from op2 in foperator_equal::op1_range. X-Git-Tag: basepoints/gcc-14~5057 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca1715ba544e20a85c8423094a18562359d0309d;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index 4fbd96a74797..ad2fae578d21 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;