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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #9)
> So, does the https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962#c9 patch
> help here?

Yes.  With it we simplify the function during early FRE to

f (struct S * e)
{
  mytype x;
  mytype * _4;
  unsigned int _6;
  mytype _8;

  <bb 2>:
  _4 = e_3(D)->pu;
  _6 = MEM[(char * {ref-all})_4];
  MEM[(char * {ref-all})&x] = _6;
  _8 = x;
  x ={v} {CLOBBER};
  return _8;

(missed optimization - alias stmt walking doesn't honor edge non-executablility
as figured out by FRE).  Later optimization turns this into

  <bb 2>:
  _3 = e_2(D)->pu;
  _4 = MEM[(char * {ref-all})_3];
  return _4;

Reply via email to