[Bug target/80689] 128 loads generated for structure copying with gcc 7.1.0 and leads to STLF stalls in avx2 targets.

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 9 10:26:00 GMT 2017


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Target|                            |x86_64-*-*

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
That you use noinline tells that glibc memcpy has the very same issue.  Note
that similarly having bytes/shorts in the structure and using longs or ints
to implement inlined memcpy has the same issue.

So I don't see how to easily fix this, or rather I don't think we can fix it at
all apart from the case where we can see both the struct copy and previous
stores to the source (thus when you enable inlining).


More information about the Gcc-bugs mailing list