[Bug tree-optimization/19832] don't remove an if when we know the value is the same as with the if (subtraction)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Aug 6 11:41:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19832

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-06 11:41:27 UTC ---
There is no straight-forward place to handle transform of

  <bb 2>:
  if (i_2(D) != j_3(D))
    goto <bb 3>;
  else
    goto <bb 4>;

  <bb 3>:
  D.1715_4 = i_2(D) - j_3(D);

  <bb 4>:
  # D.1715_1 = PHI <D.1715_4(3), 0(2)>

to

  <bb 2>:

  <bb 3>:
  D.1715_4 = i_2(D) - j_3(D);

  <bb 4>:
  D.1715_1 = D.1715_4;

but it eventually feels like a phi-opt transform.



More information about the Gcc-bugs mailing list