Hi Peter and Segher, on 2022/7/23 03:28, Peter Bergner wrote: > On 7/22/22 1:53 PM, Peter Bergner wrote: >> So I think the way the code above *should* work is: >> 1) Any -mdejagnu-cpu= usage should filter out all -mcpu= and -mtune= options. >> 2) Any -mdejagnu-tune= usage should filter all -mtune= options. >> It should not filter out any -mcpu= options. > > Like this: > > diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h > index 3b8941a8658..26874943795 100644 > --- a/gcc/config/rs6000/rs6000.h > +++ b/gcc/config/rs6000/rs6000.h > @@ -86,7 +86,7 @@ > RUNTESTFLAGS override those set in the testcases; with this option, > the testcase will always win. Ditto for -mdejagnu-tune=. */ > #define DRIVER_SELF_SPECS \ > - "%{mdejagnu-cpu=*: % + "%{mdejagnu-cpu=*: % "%{mdejagnu-tune=*: % "%{mdejagnu-*: % SUBTARGET_DRIVER_SELF_SPECS > > > Kewen, can you see if the above patch fixes the issues you're seeing? > Thanks for the insightful comments and patch! I confirmed that this proposed patch can fix those found test issues. I adjusted the relevant comments and confirmed that it can be bootstrapped and regtested on powerpc64-linux-gnu P7 and P8 and powerpc64le-linux-gnu P9 and P10. Segher pre-approved it, I just committed it as r13-1818 as attached. Will backport it to release branches in a week or so. Thanks again. BR, Kewen