[Bug tree-optimization/42717] [4.5 Regression] ice: verify_ssa failed

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jan 13 13:16:00 GMT 2010



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-01-13 13:16 -------
This:

      /* We are sure that for every live PHI we are seeing control dependent
BB.
         This means that we can look up the end of control dependent path
leading
         to the PHI itself.  */
      FOR_EACH_EDGE (e2, ei, post_dom_bb->preds)
        if (e2 != e && dominated_by_p (CDI_POST_DOMINATORS, e->src, e2->src))
          break;

is broken.

We redirect lbl_42 -> bb 4 to bb 7 in

<bb 2>:

lbl_42:
  p_20.0_8 = (signed char) p_20_7(D);
  D.2736_9 = (int) p_20.0_8;
  D.2769_26 = D.2736_9 ^ 1;
  D.2766_31 = D.2769_26 & -2;
  if (D.2766_31 != 0)
    goto <bb 4>;
  else
    goto <bb 5>;

<bb 4>:
  D.2763_32 = (signed char) D.2766_31;
  goto <bb 6>;

<bb 5>:
  D.2764_34 = p_20_7(D) + 255;
  D.2763_35 = (signed char) D.2764_34;

<bb 6>:
  # D.2763_36 = PHI <D.2763_32(4), D.2763_35(5)>
  p_20_11 = (unsigned char) D.2763_36;

<bb 7>:
  # l_23_2 = PHI <l_23_17(12), 0(6)>

but instead of finding 6 -> 7 we find 12 -> 7, a loop backedge.  We have
to find the correct path leading to the PHI node in case there is an
ambiguity like here.

Not sure if excluding back edges is enough, but certainly a back edge
cannot be the correct one?

Well.  I'm testing a patch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-01-13 01:17:47         |2010-01-13 13:16:16
               date|                            |


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



More information about the Gcc-bugs mailing list