Hi! On Wed, Jul 20, 2022 at 05:31:11PM +0800, Kewen.Lin wrote: > As PR106345 shows, some test cases should be updated with > -mdejagnu-tune, since their test points are sensitive to > rs6000_tune, such as: group_ending_nop, loop align (ic), > float conversion cost etc.
It does not make sense to require -mdejagnu-tune= if -mdejagnu-cpu= is already given? What is the failure case? > This patch is to replace -mdejagnu-cpu with -mdejagnu-tune > or append -mdejagnu-tune (keep the original -mdejagnu-cpu > when it's required) accordingly. It is *always* required. Testcases with -mtune= but unspecified -mcpu= make no sense. > --- a/gcc/testsuite/gcc.target/powerpc/compress-float-ppc-pic.c > +++ b/gcc/testsuite/gcc.target/powerpc/compress-float-ppc-pic.c > @@ -1,5 +1,5 @@ > /* { dg-do compile { target powerpc_fprs } } */ > -/* { dg-options "-O2 -fpic -mdejagnu-cpu=power5" } */ > +/* { dg-options "-O2 -fpic -mdejagnu-cpu=power5 -mdejagnu-tune=power5" } */ > /* { dg-require-effective-target fpic } */ This should only make a difference if you have -mtune= in your RUNTEST_FLAGS, and you shouldn't do silly things like that. I suspect you see it in other cases, and those are actual bugs then, that need actual fixing instead of sweeping under the carper. The testcase suggests this is with a compiler configured with --with-cpu= --with-tune=, which should just work, and -mcpu= should override both of those! Segher