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

--- Comment #2 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
Created attachment 30464
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30464&action=edit
strlenopt-10.c optimized dump file from -Os compilation

This is expanded not into a single, but multiple assignments:
  MEM[(char * {ref-all})lp_24(D)] = _3;
  MEM[(char * {ref-all})lp_24(D) + 2B] = _12;
  MEM[(char * {ref-all})lp_24(D) + 4B] = _14;
  MEM[(char * {ref-all})lp_24(D) + 6B] = _15;
  MEM[(char * {ref-all})lp_24(D) + 8B] = _17;
  MEM[(char * {ref-all})lp_24(D) + 10B] = _18;
  MEM[(char * {ref-all})lp_24(D) + 12B] = _19;
  MEM[(char * {ref-all})lp_24(D) + 14B] = _21;
  MEM[(char * {ref-all})lp_24(D) + 16B] = _22;
  MEM[(char * {ref-all})lp_24(D) + 18B] = _23;

So I can't see how expand could convert that back.
OTOH convert is able to expand memcpy to multiple assignments, under control
of the target, so if in doubt, it's better to leave it as memcpy till expand.

Reply via email to