Hi Torbjörn, On Fri, 11 Jul 2025 at 10:47, Torbjörn SVENSSON <torbjorn.svens...@foss.st.com> wrote: > > Ok for trunk, gcc-15 and gcc-14. > > I discovered that the dg-require-effective-target is missing on gcc-14, > but it's probably the right thing to add on gcc-15 and trunk too. > > Without the `dg-require-effective-target vect_early_break`, the > `dg-add-options vect_early_break` will return the flags unchanged and > `dg-require-effective-target vect_early_break_hw` will succeed as it > overrides the flags, causing the tests to use the wrong target. > > Let me know what you think. > > -- > > With the -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c, these tests start to pass due to that the > cpu/arch is overridden. The proper thing to do when using > `dg-add-options vect_early_break` is to also have a > `dg-require-effective-target vect_early_break`, so adding this. >
So IIUC: - on gcc-14 the tests are skipped because you override -march/-mcpu when testing, and arm_v8_neon_ok fails when called from vect_early_break ? - on gcc-15 and trunk, the tests now pass thanks to -mcpu=unset/-march=unset but you are concerned that 'dg-add-options vect_early_break' is used without the corresponding effective-target? So your patch is just "cosmetic" and has no impact on the testsuite results? I have another concern (hence cc'ing Alexandre): vect.exp calls check_vect_support_and_set_flags which defines dg-do-what-default according to what it discovers, meaning that for some targets these tests are 'run' and on others they are just 'compile'. So I suppose we should use 'dg-require-effective-target vect_early_break_hw' only when running the tests and 'dg-require-effective-target vect_early_break' when compiling them? I suppose at the moment we completely skip these tests, while would could at least compile them on some targets? I think you can remove the 'arm' keywork in the title of your commit message, as this patch can impact all targets. Thanks, Christophe > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/tsvc/vect-tsvc-s332.c: Add > dg-require-effective-target vect_early_break to test. > * gcc.dg/vect/tsvc/vect-tsvc-s481.c: Likewise. > * gcc.dg/vect/tsvc/vect-tsvc-s482.c: Likewise. > > Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com> > --- > gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c | 1 + > gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c | 1 + > gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c > b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c > index 21a9c5a6b2b..b4154040d1b 100644 > --- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c > +++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c > @@ -3,6 +3,7 @@ > > /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ > /* { dg-require-effective-target vect_float } */ > +/* { dg-require-effective-target vect_early_break } */ > /* { dg-require-effective-target vect_early_break_hw } */ > /* { dg-add-options vect_early_break } */ > > diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c > b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c > index e4433385d66..156e44972bd 100644 > --- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c > +++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c > @@ -3,6 +3,7 @@ > > /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ > /* { dg-require-effective-target vect_float } */ > +/* { dg-require-effective-target vect_early_break } */ > /* { dg-require-effective-target vect_early_break_hw } */ > /* { dg-add-options vect_early_break } */ > > diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c > b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c > index 146df409ecc..a1fcb18c557 100644 > --- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c > +++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c > @@ -3,6 +3,7 @@ > > /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ > /* { dg-require-effective-target vect_float } */ > +/* { dg-require-effective-target vect_early_break } */ > /* { dg-require-effective-target vect_early_break_hw } */ > /* { dg-add-options vect_early_break } */ > > -- > 2.25.1 >