[PATCH] rs6000: Update powerpc test cases to use -mdejagnu-cpu=.

Segher Boessenkool segher@kernel.crashing.org
Tue Aug 11 23:35:16 GMT 2020


Hi!

On Tue, Aug 11, 2020 at 08:22:47AM -0500, Peter Bergner wrote:
> I was looking through some POWER10 test cases and noticed that we used
> -mcpu=power10 rather than the preferred -mdejagnu-cpu=power10.

It is not just *preferred*; things work incorrectly on many systems
without it.  If all systems we tested on had a brand new software
install (a very bad idea -- we should test on older systems as well!),
or if we included dejagnu with GCC itself, this would not be a problem.

> I went
> looking for more tests that were not converted over and came up with the
> following patch.  Ok for trunk?

Very many, huh.  I sweeped this not so long ago...


> gcc/testsuite/
> 	* g++.dg/ext/spe1.C (dg-options): Use -mdejagnu-cpu=.

That test is not for us (it is for powerpcspe) (and the testcase could
really be deleted by now).  So NAK for this one.

> 	* gcc.target/powerpc/pr93122.c: Likewise.

My fault, thanks.

> 	* gcc.target/powerpc/vsx_mask-count-runnable.c: Likewise.
> 	* gcc.target/powerpc/vsx_mask-expand-runnable.c: Likewise.
> 	* gcc.target/powerpc/vsx_mask-extract-runnable.c: Likewise.
> 	* gcc.target/powerpc/vsx_mask-move-runnable.c: Likewise.

Also new.

> 	* gfortran.dg/pr47614.f (dg-options): Likewise.
> 	* gfortran.dg/pr58968.f: Likewise.

Ah, I missed these two from the start.

> 	* gfortran.dg/nint_p7.f90: Likewise.  Remove unneeded dg-skip-if.
> 	* gfortran.dg/vect/pr45714-b.f: Likewise.

And these.

Maybe those should be moved to ppc-fortran/ ?

> 	* g++.dg/pr65240-1.C: Likewise.
> 	* g++.dg/pr65240-2.C: Likewise.
> 	* g++.dg/pr65240-3.C: Likewise.
> 	* g++.dg/pr65240-4.C: Likewise.
> 	* g++.dg/pr65242.C: Likewise.
> 	* g++.dg/pr67211.C: Likewise.
> 	* g++.dg/pr69667.C: Likewise.
> 	* g++.dg/pr71294.C: Likewise.
> 	* g++.dg/pr84279.C: Likewise.
> 	* g++.dg/torture/ppc-ldst-array.C: Likewise.
> 	* g++.dg/torture/pr69264.C (dg-additional-options): Use -mdejagnu-cpu=.

Similar for these, but you did skip the SPE ones here?  And you skipped
a whole bunch more C++ tests?

> 	* gcc.dg/pr84032.c: Likewise.
> 	* gcc.dg/torture/pr90972.c: Likewise.
> 	* gcc.dg/vect/O3-pr70130.c: Likewise.
> 	* gcc.dg/vect/pr48765.c: Likewise.  Remove unneeded dg-skip-if.

5234d2e686ff shows the scripts I used originally:

    perl -ni -e 'print unless /dg-skip-if "do not override -mcpu"/' \
      $(find gcc/testsuite/gcc.target/powerpc/ -type f)
    perl -pi -e 's/(dg-options.*)-mcpu=/\1-mdejagnu-cpu=/'  \
      $(find gcc/testsuite/gcc.target/powerpc/ -type f)

You might find more false positives than I did with that in other dirs,
but if not, might be useful to keep in a script ;-) (And I know it
doesn't find everything, yes :-/ )

So other then the SPE ones it is fine, but perhaps you missed some?


Segher


More information about the Gcc-patches mailing list