> From: Jiang, Haochen > Sent: Friday, August 29, 2025 1:48 PM > > > From: Andi Kleen <[email protected]> > > Sent: Friday, August 29, 2025 1:22 PM > > > > This patch should fix it. Please confirm. > > > > > > diff --git a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c > > b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c > > index e5be3a35538..cb576eb4498 100644 > > --- a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c > > +++ b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c > > @@ -1,5 +1,5 @@ > > /* { dg-do compile } */ > > -/* { dg-options "-mgfni -mavx512vl -mavx512bw -mavx512f -O3" } */ > > +/* { dg-options "-mgfni -mavx512vl -mavx512bw -mavx512f -O3 - > > march=x86-64 -mtune=generic" } */ > > /* { dg-final { scan-assembler-times "vgf2p8affineqb" 14 } } */ > > > > #ifndef N > > diff --git a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-2.c > > b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-2.c > > index 098361aa9ab..c46af84bdcc 100644 > > --- a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-2.c > > +++ b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-2.c > > @@ -1,5 +1,5 @@ > > /* { dg-do run } */ > > -/* { dg-options "-mgfni -mavx512vl -mavx512bw -mavx512f -O3 -Wno- > shift- > > count-negative" } */ > > +/* { dg-options "-mgfni -mavx512vl -mavx512bw -mavx512f -O3 -Wno- > > shift-count-negative -march=x86-64 -mtune=generic" } */ > > > > #include <string.h> > > > > diff --git a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-3.c > > b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-3.c > > index 9e5ae5d19f3..2099f4edddf 100644 > > --- a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-3.c > > +++ b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-3.c > > @@ -1,5 +1,5 @@ > > /* { dg-do compile } */ > > -/* { dg-options "-mgfni -mavx512bw -mavx512f -O3" } */ > > +/* { dg-options "-mgfni -mavx512bw -mavx512f -O3 -march=x86-64 - > > mtune=generic" } */ > > /* { dg-final { scan-assembler-times "vgf2p8affineqb" 12 } } */ > > > > /* Based on a test case from Andrew Pinski */ > > diff --git a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-5.c > > b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-5.c > > index 65fb69227e6..b8489a659a5 100644 > > --- a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-5.c > > +++ b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-5.c > > @@ -1,5 +1,5 @@ > > /* { dg-do compile } */ > > -/* { dg-options "-mgfni -mavx -O3 -Wno-shift-count-negative" } */ > > +/* { dg-options "-mgfni -mavx -O3 -Wno-shift-count-negative -march=x86- > > 64 -mtune=generic" } */ > > /* { dg-final { scan-assembler-times "vgf2p8affineqb" 31 } } */ > > At least -mtune=generic won't fix this from my side. > > gcc.target/i386/shift-gf2p8affine-5.c: vgf2p8affineqb found 53 times > FAIL: gcc.target/i386/shift-gf2p8affine-5.c scan-assembler-times > vgf2p8affineqb 31 >
Sorry, mine. I just found you also added -march=x86-64. Then it should be fixed everywhere. Thx, Haochen
