https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28831
--- Comment #43 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> --- I see this issue in SIMD programming. Example (on x86_64 with only '-O2', i.e. without AVX512) https://compiler-explorer.com/z/K64djP356: typedef int V __attribute__((vector_size(64))); V gen(); void g0(V const&, V const&); void g1(V, V); void constref() { g0(gen(), gen()); } void byvalue() { g1(gen(), gen()); } Both the 'constref' and 'byvalue' cases copy every V argument before calling g0/g1.