On 8/26/26 5:36 PM, Michael Meissner wrote: > It would be helpful to create a second patch that adds a test case for > pr121076. You can check the patch in now, but do add a test case in > the future. > > Note, care must be taken to specifiy that the codegen is for power8 or > power9. > > In particular, if you use the -mdejagnu-cpu=power8, it won't override > the default if the compiler was configured for power10 code generation > (i.e. using the --with-cpu=power10 configuration option). You could > explicitly use -mcpu=power8 on the target options instead of > -mdejagnu-cpu=power8.
The -mdejagnu-cpu=XXX option *is* the correct option to enforce a specific -mcpu=XXX is used for a testsuite test case. It will override any compiler default (--with-cpu=YYY) or any user trying to force a different -mcpu=ZZZ via make check's RUNTESTFLAGS= in a testsuite test case. It's why we added it way back when. It uses GCC SPECs magic to remove all -mcpu= options from the command line (explicit ones from the user and implicit ones from the default) and them renames the -mdejagnu-cpu=XXX option to -mcpu=XXX leaving just it to compile the test case. It can easily be confirmed via a "gcc -v -S -mdejagnu-cpu=XXX -mcpu=YYY ..." compile. Peter
