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

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
We're expanding memmove inline on GIMPLE if the size is constant power-of-two
and up to MOVE_MAX.

      /* If we can perform the copy efficiently with first doing all loads
         and then all stores inline it that way.  Currently efficiently
         means that we can load all the memory into a single integer
         register which is what MOVE_MAX gives us.  */

note as targets allow by_pieces to use larger regs now we could up that
limit as well (we just need an appropriate large integer type for the
copy).  Emitting multiple loads/stores on GIMPLE is of course also
possible, likewise would be SRA actually analyzing memmove/copy as
copies (tracking addressability properly of course - rewriting the calls
to aggregate copies of char[] would eventually ease this) so we'd use
matching loads/stores, easing followup optimization and avoiding STLF
penalties when using too large accesses.

Reply via email to