https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93059
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> --- We could indeed relax a bit the "same type" condition. We could also make sure that __restrict appears somewhere in the call chain when using copy or uninitialized_*, which lets the compiler merge the 2 loads/stores. (In reply to fdlbxtqi from comment #2) > The last 2nd line return __dst is wrong. It should not exist. Write a patch, test it, and send it to the mailing list? (In reply to fdlbxtqi from comment #3) > For vector, the performance lost is even worse. It generates 96 lines of > assembly for different types since it does not call memmove. What operation are you doing on vector? None of your testcases seem to use it. > clearly incorrect Please distinguish between what is wrong (generated code crashes, or returns 3 instead of 2), and what is suboptimal.