[Bug tree-optimization/59303] [4.9 Regression] uninit-pred-8_b.c and uninit-pred-9_b.c fail after better optimizations

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Dec 21 09:46:00 GMT 2013


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31496
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31496&action=edit
cleanups

I had also a brief look at this recently, but haven't made progress beyond
attached formatting/cleanup patch so far (plus only dumping details with
*-details, otherwise the dumps are pretty much inconsistent).
My conclusion has also been that to fix this up the predicates would need to be
normalized before comparison, and simplified, at least if the initial subset
check fails.  On uninit-pred-8_b.c there has been additional complication
because PRE decides to change the IL and we end up with:
  <bb 3>:
  pretmp_24 = r_10(D) <= 19;
  goto <bb 5>;

  <bb 4>:
  _11 = r_10(D) <= 19;
  _13 = l_12(D) != 0;
  _14 = _11 | _13;
  if (_14 != 0)
    goto <bb 14>;
  else
    goto <bb 15>;

  <bb 14>:
  goto <bb 3>;

  <bb 15>:

  <bb 5>:
  # v_1 = PHI <v_15(D)(15), r_10(D)(3)>
  # prephitmp_30 = PHI <0(15), pretmp_24(3)>
  if (m_7(D) != 0)
    goto <bb 6>;
  else
    goto <bb 7>;

  <bb 6>:
  g.0_17 = g;
  g.1_18 = g.0_17 + 1;
  g = g.1_18;
  goto <bb 8>;

  <bb 7>:
  bar ();

  <bb 8>:
  _3 = prephitmp_30 | _9;
  if (_3 != 0)
so the prephitmp_30 would need to be canonicalized into _14 != 0 && r_10(D) <=
19 aka (r_10(D) <= 19 || l_12(D) != 0) && r_10(D) <= 19 and from there to
r_10(D) <= 19.



More information about the Gcc-bugs mailing list