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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dbarboza at ventanamicro dot 
com

--- Comment #7 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Daniel, I think this starts to touch on the class of issues you've been poking
at.  If we look at the .optimized dump;


 if (x_2(D) != 4294967295)
    goto <bb 3>; [66.00%]
  else
    goto <bb 4>; [34.00%]
;;    succ:       3
;;                4

;;   basic block 3, loop depth 0
;;    pred:       2
  _3 = x_2(D) + 1;
;;    succ:       4

;;   basic block 4, loop depth 0
;;    pred:       2
;;                3
  # _1 = PHI <0(2), _3(3)>
  return _1;

Conceptually we want to prove that the expression generating _3 has the value
"0"  if it were evaluated on the edge 2->4.

Feels like a match.pd pattern being used from within phi-opt.   If we start
with relatively simple expressions then it may not blow up in our face.  We may
need ranger to give us the value of x_2 on the edge 2->4  (-1 in this case), we
can also get it from DOM's tables, though Ranger is probably the better
solution.  Ranger also has some nice evaluation routines where I think we might
be able to utilize as well.

Not sure if Andrew is doing much with this right now, so sync with him before
spending any meaningful time on it when you're back from PTO.

Reply via email to