https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107591

--- Comment #11 from Andrew Macleod <amacleod at redhat dot com> ---
(In reply to Jakub Jelinek from comment #10)
> (In reply to Andrew Macleod from comment #9)
> > you could also test whether op1_range contains + and/or - 0, as well as
> > op2_range.  VREL_EQ is a symbolic equality.. the ranges can still be
> > distinct and individually testable to see if you have a +0 and -0..   I
> > guess you could also test for equality of the ranges.. op1_range == 
> > op2_range
> 
> Equality of the ranges doesn't imply equality of the values.
> 
> int
> foo (int x, y)
> {
>   if (x < -13 || x > 26)
>     return -1;
>   if (y < -13 || y > 26)
>     return -1;
>   return x * y;
> }
> 
> In the above testcase, both x and y have [-13, 26] ranges, but here the
> range [-338, 676] is correct, while [0, 676] is right for the #c0 testcase.

no, I meant in addition to the VREL_EQ.  so 
  if (rel == VREL_EQ && op1_range != op2_range)
     then you know you have something like  if (x == y) z=x*y and may have to
check for various signed zero cobinations in each range, 
whereas is op1_range == op2_range in this case, it should be perfectly safe..

Reply via email to