[Bug tree-optimization/59611] std::copy performs worse than naive implementation when copying a single known byte

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 27 22:29:00 GMT 2013


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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-12-27
          Component|libstdc++                   |tree-optimization
     Ever confirmed|0                           |1

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
The call to memcpy is folded rather early to:
  MEM[(char * {ref-all})p_2(D)] = MEM[(char * {ref-all})&a];

and then we don't touch it anymore, maybe because we don't go through an
SSA_NAME. We thus miss that the RHS is a constant.



More information about the Gcc-bugs mailing list