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

--- Comment #15 from mateuszb at poczta dot onet.pl ---
(In reply to David Faust from comment #10)
> It should also be improved to emit only either the forwards or backwards
> loop if the relationship between source and dest is known at compile time.

Yes, it will be faster and smaller code. The example
__builtin_memmove (&buf[1], &buf[0], 16);
&buf[1] is unknown at compile time, also &buf[0], but we know that &buf[1] >
&buf[0]. Is tere any function/macro to compare pointers (at compile time) that
have the same base and different offsets?

Reply via email to