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

--- Comment #7 from Andrew Macleod <amacleod at redhat dot com> ---
Created attachment 54716
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54716&action=edit
proposed patch

This is due to the latter part of the specified patch.  We normally terminate
outgoing range calculations once the LHS has reverted to VARYING as we won't
learn anything new.

The original patch modified this such that if there was a relation present, we
continued calculating as the relation may provide new information, as per the
original PR.

The problem exposed in this PR is that the presence of a relation doesn't mean
that relation can actually affect the range.  This PR shows many relations,
none of which are relevant, and with the quadratic nature of the path query, it
makes things quite bad.

The attached patch is in testing.  It adds a check to determine if the relation
can affect the outgoing range or not by checking if the operands are used in
the calculation or not.  If they are not in the definition chain, they can have
no impact, and we stop the attempt.

Reply via email to