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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm.  We end up with

main ()
{
  int d.0_4;
  int e.1_5;
  int _7;
  int b.7_11;
  int a.8_12;

  <bb 2>:
  d.0_4 = d;
  e.1_5 = 1 >> d.0_4;
  e = e.1_5;
  _7 = 31 / 0;

in the end.  Which is caused by tail-merging (part of PRE) optimizing

  <bb 2>:
  d.0_4 = d;
  e.1_5 = 1 >> d.0_4;
  e = e.1_5;
  if (e.1_5 <= 0)
    goto <bb 10>;
  else
    goto <bb 3>;

  <bb 10>:
  goto <bb 4>;

  <bb 3>:
  _7 = 31 / 0;

  <bb 4>:

by removing bb 3 as having no side-effect appearantly (_7 is unused).  It
produces

  <bb 2>:
  d.0_4 = d;
  e.1_5 = 1 >> d.0_4;
  e = e.1_5;

  <bb 3>:
  _7 = 31 / 0;

  <bb 4>:

not sure how it ends up doing that (I suppose it has code to merge an
if diamond).

Reply via email to