------- Comment #2 from rguenth at gcc dot gnu dot org  2007-09-03 12:01 -------
The problem is that forwprop doesn't propagate addr_exprs to memory reference
stmts in early optimization anymore (due to the volatile issues) and 
value numbering cannot deal with the different (but same) load/store addresses:

  D.2605_34 = &this_2(D)->D.2527;
  # VUSE <tab_57, SMT.9_59, SMT.11_63>
  D.2606_35 = this_2(D)->D.2527.a;
...
  # tab_77 = VDEF <tab_57>
  # SMT.11_78 = VDEF <SMT.11_63>
  D.2605_34->a = D.2609_38;

(also aliasing computes different answers here, for whatever reason).  With
scheduling an extra forwprop pass before FRE the second _load_ of a is
eliminated, but DSE still cannot figure the dead store:

  # VUSE <tab_57, SMT.9_59, SMT.11_63>
  D.2606_35 = this_2(D)->D.2527.a;
  D.2607_36 = (unsigned int) D.2606_35;
  D.2608_37 = D.2607_36 + 2;
  D.2609_38 = (int) D.2608_37;
  # tab_77 = VDEF <tab_57>
  # SMT.9_93 = VDEF <SMT.9_59>
  # SMT.11_78 = VDEF <SMT.11_63>
  this_2(D)->D.2527.a = D.2609_38;
  D.2612_41 = (unsigned int) D.2609_38;
  D.2613_42 = D.2612_41 + 2;
  D.2614_43 = (int) D.2613_42;
  # tab_79 = VDEF <tab_77>
  # SMT.9_94 = VDEF <SMT.9_93>
  # SMT.11_80 = VDEF <SMT.11_78>
  this_2(D)->D.2527.a = D.2614_43;


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |alias, missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2007-09-03 12:01:47
               date|                            |


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

Reply via email to