On Wed, Dec 13, 2023 at 11:55:52AM +0100, Jakub Jelinek wrote:
> On Wed, Dec 13, 2023 at 10:43:16AM +0000, Andre Vieira (lists) wrote:
> > --- a/libgomp/testsuite/libgomp.c/declare-variant-1.c
> > +++ b/libgomp/testsuite/libgomp.c/declare-variant-1.c
> > @@ -40,16 +40,17 @@ f04 (int a)
> >  int
> >  test1 (int x)
> >  {
> > -  /* At gimplification time, we can't decide yet which function to call.  
> > */
> > -  /* { dg-final { scan-tree-dump-times "f04 \\\(x" 2 "gimple" } } */
> > +  /* At gimplification time, we can't decide yet which function to call for
> > +     x86_64 targets, given the f01 variant.  */
> > +  /* { dg-final { scan-tree-dump-times "f04 \\\(x" 2 "gimple" { target 
> > x86_64-*-* } } } */
> >    /* After simd clones are created, the original non-clone test1 shall
> >       call f03 (score 6), the sse2/avx/avx2 clones too, but avx512f clones
> >       shall call f01 with score 8.  */
> >    /* { dg-final { scan-ltrans-tree-dump-not "f04 \\\(x" "optimized" } } */
> > -  /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 14 "optimized" { 
> > target { !aarch64*-*-* } } } } } */
> > -  /* { dg-final { scan-ltrans-tree-dump-times "f01 \\\(x" 4 "optimized" { 
> > target { !aarch64*-*-* } } } } } */
> > -  /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 10 "optimized" { 
> > target { aarch64*-*-* } } } } } */
> > -  /* { dg-final { scan-ltrans-tree-dump-not "f01 \\\(x" "optimized" { 
> > target { aarch64*-*-* } } } } } */
> > +  /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 14 "optimized" { 
> > target { !aarch64*-*-* } } } } */
> > +  /* { dg-final { scan-ltrans-tree-dump-times "f01 \\\(x" 4 "optimized" { 
> > target { !aarch64*-*-* } } } } */
> > +  /* { dg-final { scan-ltrans-tree-dump-times "f03 \\\(x" 10 "optimized" { 
> > target { aarch64*-*-* } } } } */
> > +  /* { dg-final { scan-ltrans-tree-dump-not "f01 \\\(x" "optimized" { 
> > target { aarch64*-*-* } } } } */
> 
> The changes in this test look all wrong.  The differences are
> i?86-*-* x86_64-*-* (which can support avx512f isa) vs. other targets (which
> can't).
> So, there is nothing aarch64 specific in there and { target x86_64-*-* }
> is also incorrect.  It should be simply
> { target i?86-*-* x86_64-*-* }
> vs.
> { target { ! { i?86-*-* x86_64-*-* } } }
> (never sure about the ! syntaxes).

Or even better just make the whole test i?86-*-* x86_64-*-* specific.
It is really testing the details how many clones are created and what is
called in them, so nothing that applies to other architectures and how
many clones those have will differ, but what exactly will be called in there
will be the same.

        Jakub

Reply via email to