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

--- Comment #2 from Andrew Macleod <amacleod at redhat dot com> ---
We always register relations on outgoing edges from a conditional.
in this case
  _2 = -f_6;      //  f_6 was known to be [4,5]
  if (_2 == f_6)   // This this was known to fail because _2 was [-5, -4]
    goto <bb 8>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 8> :
  if (_2 != f_6)     // which makes this unreachable code
    goto <bb 10>; [INV]
  else
    goto <bb 9>; [INV]

THe problem is we were registering _2 == f_6 as a relation on the edge 6->8
which would then make the condition on bb_8 false. 
We know that _2 != f_6, so the vrp folder was saying this branch was always
taken, and the relation code was prompted that its never taken :-P  Its an
unreachable branch, but it was adding an inconsitency.

Instead, if we know an edge cannot be taken, like 6->8, do not register a
relation on that edge.

Reply via email to