On Mon, Jun 1, 2020 at 3:19 AM Alexander Monakov wrote:
>
> On Sun, 31 May 2020, H.J. Lu via Gcc-patches wrote:
>
> > --- a/gcc/config/i386/i386-expand.c
> > +++ b/gcc/config/i386/i386-expand.c
> > @@ -7656,6 +7656,90 @@ ix86_expand_set_or_cpymem (rtx dst, rtx src, rtx
> > count_exp, rtx val_exp,
On Sun, 31 May 2020, H.J. Lu via Gcc-patches wrote:
> --- a/gcc/config/i386/i386-expand.c
> +++ b/gcc/config/i386/i386-expand.c
> @@ -7656,6 +7656,90 @@ ix86_expand_set_or_cpymem (rtx dst, rtx src, rtx
> count_exp, rtx val_exp,
>return true;
> }
>
> +/* Expand cmpstrn or memcmp. */
> +
>
We used to expand memcmp to "repz cmpsb" via cmpstrnsi. It was changed
by
commit 9b0f6f5e511ca512e4faeabc81d2fd3abad9b02f
Author: Nick Clifton
Date: Fri Aug 12 16:26:11 2011 +
builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi pattern.
* builtins.c (expand_builtin_m