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

--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> ---
Range isn't getting it because its not an equivalency, but rather an
unquivalence.

=========== BB 4 ============
x_3(D)  [irange] int VARYING
Relational : (x_3(D) != y_4(D))
    <bb 4> :
    if (x_3(D) == 999)
      goto <bb 5>; [INV]
    else 
      goto <bb 7>; [INV]

=========== BB 5 ============
Imports: y_4(D)
Exports: y_4(D)
y_4(D)  [irange] int VARYING
    <bb 5> :
    if (y_4(D) == 999)
      goto <bb 6>; [INV]
    else
      goto <bb 7>; [INV]

It knows that x_3 != y_4, and we also know that x_4 is [999, 999] in BB5.. but
there is nothing to indicate that when evaluating y_4 == 999, we should look at
the value of x_3.

Its too expensive to check all relations every time.  Well, it use to be, I
will run an experiment to see what the impact is there days.   I had also
experimented with querying  the most recent relation for info.

Bottom line is a relation query needs to be made to see if there is an
equivalence or other relation with X, and then apply that relation to the range
of X and 
see if it has any impact on the range of Y
.   
The question is how to do it efficiently as functions gt larger.

A query needs to be made if there is a relation (find x_3 != y_4)
Then a query to be made for the range of the other part of the relation  (x_3)
The apply that relation& range to y_4 and see if it makes any difference.

Reply via email to