https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128440
David Faust <dfaust at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |dfaust at gcc dot
gnu.org
--- Comment #16 from David Faust <dfaust at gcc dot gnu.org> ---
(In reply to mateuszb from comment #15)
> (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?
It should not be difficult, but it's an enhancement so I'd rather not mix it
with the wrong-code fixes in this PR. I've added a note as a todo in the
BPFBackEnd wiki page for now.