------- Comment #4 from rguenth at gcc dot gnu dot org  2010-01-05 11:31 -------
Somehow patched openSUSE GCC 4.3 is also affected.

<bb 2>:
  # index_18 = VDEF <index_17(D)>
  index = 0;
  # index_21 = VDEF <index_18>
  # SMT.57_22 = VDEF <SMT.57_19(D)>
  # SMT.58_23 = VDEF <SMT.58_20(D)>
  table_p_1 = init ();
  D.1295_3 = &table_p_1->data[1];
  # SMT.57_24 = VDEF <SMT.57_22>
  table_p_1->data[1].num = 0;
  goto <bb 4>;

<bb 3>:
  # VUSE <SMT.58_10>
  D.1355_5 = D.1295_3->num;
  D.1356_6 = D.1355_5 + 1;
  # SMT.58_25 = VDEF <SMT.58_10>
  D.1295_3->num = D.1356_6;
  index_8 = index_7 + 1;

<bb 4>:
  # index_7 = PHI <0(2), index_8(3)>
  # SMT.58_10 = PHI <SMT.58_23(2), SMT.58_25(3)>
  if (index_7 == 0)
    goto <bb 3>;
  else
    goto <bb 5>;

<bb 5>:
  # VUSE <SMT.57_24>
  D.1355_9 = table_p_1->data[1].num;

FRE CSEs the load from table_p_1->data[1].num with the store in BB2 not
seeing the must-alias in BB3.  And it's obvious why when you look at the
vops.

SMT.58 needs to have SMT.57 in its may-aliases but doesn't have it
for some reason.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |alias, wrong-code
      Known to fail|                            |4.4.0 4.4.2
      Known to work|                            |4.2.4 4.3.4 4.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2010-01-05 11:31:37
               date|                            |
            Summary|FRE optimizes away valid    |[4.4 Regression] FRE
                   |code after IPA inlining     |optimizes away valid code
                   |                            |after IPA inlining
   Target Milestone|---                         |4.4.3


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

Reply via email to