This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/70140] Inefficient expansion of __builtin_mempcpy


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

--- Comment #7 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #6)
> Created attachment 41772 [details]
> Patch candidate
> 
> I'm going to prepare some test-cases for that. Does it look good?

Yes, it now inlines small constant sizes. However large and variable sized
copies have the wrong return value:

void *f1(void *p, void *q) { return __builtin_mempcpy(p, q, 256); }

f1:
        mov     x2, 256
        b       memcpy

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]