[Bug c++/91217] Returning std::array from lambda results in an extra copy step on return

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 21 07:38:00 GMT 2019


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
I didn't notice an extra copy. What I did notice is that in one case we don't
inline, and ldist turns the copying loop into memcpy, while in the other case
we do inline, and ldist (and vectorization) fail to handle a read from a
constant string as a memory read (they don't create a DR for it).


More information about the Gcc-bugs mailing list