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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-12-16
                 CC|rguenther at suse dot de           |rguenth at gcc dot 
gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I suppose the dump is misleading in that the inline clone has

Modification phase of node q.constprop/5
     Aggregate replacements: 0[0]=1, 0[32]=2

applied to?

__attribute__((noinline))
q.constprop (struct a a)
{
  <bb 3>:

  <bb 2>:
  t (a);
  return;

}

instead would look like wrong-code.

Ah, IPA-CP doesn't actually remove "const" parameters.

So this report is reporting that IPA-CP thinks it does sth but in the
end it's a no-op clone.

I wonder why we don't simply add

  a.a = 1;
  a.b = 2;

at the start of q.constprop.  Or if we only know a partially then initialize
those parts from the know constants?

Reply via email to