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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2018-03-12 00:00:00         |2019-3-13

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note that these days backprop figures the sign of the cos argument isn't
important and turns the whole thing into sth CSE-able to FRE2 which now
optimizes this to

  <bb 2> [local count: 1073741824]:
  if (y_6(D) < 1.0e+1)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:

  <bb 4> [local count: 1073741824]:
  # iftmp.0_3 = PHI <x_7(D)(2), y_6(D)(3)>
  _1 = cos (iftmp.0_3);
  if (_1 != _1)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 354334802]:
  link_error ();

  <bb 6> [local count: 1073741824]:
  return;

and with -ffinite-math-only we optimize the call to link_error.

Of course that's not what the bug asks for which asks for handling this
completely within VN.

Reply via email to