x86-64: Use YMM registers in memcmpeq-evex.S

Message ID 20230601034314.69375-1-hjl.tools@gmail.com
State Committed
Commit a8c888997845c5192e446176374c2e13bb3e2195
Headers
Series x86-64: Use YMM registers in memcmpeq-evex.S |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 pending Patch applied
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed

Commit Message

H.J. Lu June 1, 2023, 3:43 a.m. UTC
  Include x86-evex256-vecs.h by default to use YMM registers in
memcmpeq-evex.S.
---
 sysdeps/x86_64/multiarch/memcmpeq-evex.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Florian Weimer June 1, 2023, 5:41 a.m. UTC | #1
* H. J. Lu via Libc-alpha:

> Include x86-evex256-vecs.h by default to use YMM registers in
> memcmpeq-evex.S.
> ---
>  sysdeps/x86_64/multiarch/memcmpeq-evex.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/x86_64/multiarch/memcmpeq-evex.S b/sysdeps/x86_64/multiarch/memcmpeq-evex.S
> index 3666f649cd..7eefff77f1 100644
> --- a/sysdeps/x86_64/multiarch/memcmpeq-evex.S
> +++ b/sysdeps/x86_64/multiarch/memcmpeq-evex.S
> @@ -42,7 +42,7 @@
>  # endif
>  
>  # ifndef VEC_SIZE
> -#  include "x86-evex512-vecs.h"
> +#  include "x86-evex256-vecs.h"
>  # endif
>  # include "reg-macros.h"

It would be nice if the commit message could describe the why, not just
the what. 8-)

Thanks,
Florian
  
Noah Goldstein June 1, 2023, 3:44 p.m. UTC | #2
On Thu, Jun 1, 2023 at 12:41 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu via Libc-alpha:
>
> > Include x86-evex256-vecs.h by default to use YMM registers in
> > memcmpeq-evex.S.

Should we create an evex512 impl?

> > ---
> >  sysdeps/x86_64/multiarch/memcmpeq-evex.S | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/sysdeps/x86_64/multiarch/memcmpeq-evex.S b/sysdeps/x86_64/multiarch/memcmpeq-evex.S
> > index 3666f649cd..7eefff77f1 100644
> > --- a/sysdeps/x86_64/multiarch/memcmpeq-evex.S
> > +++ b/sysdeps/x86_64/multiarch/memcmpeq-evex.S
> > @@ -42,7 +42,7 @@
> >  # endif
> >
> >  # ifndef VEC_SIZE
> > -#  include "x86-evex512-vecs.h"
> > +#  include "x86-evex256-vecs.h"
> >  # endif
> >  # include "reg-macros.h"
>
> It would be nice if the commit message could describe the why, not just
> the what. 8-)
>

We use -evex.S postfix for 256-bit evex. This was mistakenly implemented as
evex512.


> Thanks,
> Florian
>
  
H.J. Lu June 1, 2023, 3:54 p.m. UTC | #3
On Thu, Jun 1, 2023 at 8:44 AM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> On Thu, Jun 1, 2023 at 12:41 AM Florian Weimer <fweimer@redhat.com> wrote:
> >
> > * H. J. Lu via Libc-alpha:
> >
> > > Include x86-evex256-vecs.h by default to use YMM registers in
> > > memcmpeq-evex.S.
>
> Should we create an evex512 impl?

YMM is good enough for now.   There is no need for ZMM.

> > > ---
> > >  sysdeps/x86_64/multiarch/memcmpeq-evex.S | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/sysdeps/x86_64/multiarch/memcmpeq-evex.S b/sysdeps/x86_64/multiarch/memcmpeq-evex.S
> > > index 3666f649cd..7eefff77f1 100644
> > > --- a/sysdeps/x86_64/multiarch/memcmpeq-evex.S
> > > +++ b/sysdeps/x86_64/multiarch/memcmpeq-evex.S
> > > @@ -42,7 +42,7 @@
> > >  # endif
> > >
> > >  # ifndef VEC_SIZE
> > > -#  include "x86-evex512-vecs.h"
> > > +#  include "x86-evex256-vecs.h"
> > >  # endif
> > >  # include "reg-macros.h"
> >
> > It would be nice if the commit message could describe the why, not just
> > the what. 8-)
> >
>
> We use -evex.S postfix for 256-bit evex. This was mistakenly implemented as
> evex512.
>
>
> > Thanks,
> > Florian
> >
  

Patch

diff --git a/sysdeps/x86_64/multiarch/memcmpeq-evex.S b/sysdeps/x86_64/multiarch/memcmpeq-evex.S
index 3666f649cd..7eefff77f1 100644
--- a/sysdeps/x86_64/multiarch/memcmpeq-evex.S
+++ b/sysdeps/x86_64/multiarch/memcmpeq-evex.S
@@ -42,7 +42,7 @@ 
 # endif
 
 # ifndef VEC_SIZE
-#  include "x86-evex512-vecs.h"
+#  include "x86-evex256-vecs.h"
 # endif
 # include "reg-macros.h"