[PATCH 4/4] [Powerpc] tune/optimize memmove/wordcopy. Call memcpy when appropriate.

Segher Boessenkool segher@kernel.crashing.org
Sun May 13 20:21:00 GMT 2012


> +  /* If there is no overlap between ranges, call the builtin  
> memcpy.  */
> +  if ( (dstp >= (srcp + len)) || (srcp > (dstp + len)) )
> +    return __builtin_memcpy (dest, src, len);

if (dstp - srcp >= len && srcp - dstp >= len)


Suppose dstp is -1, then your condition always evaluates to true.


Segher



More information about the Libc-alpha mailing list