Re: [PING 6][PATCH v3] rs6000/p8swap: Fix incorrect lane extraction by vec_extract() [PR106770]

Surya Kumari Jangala <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
Hi Mike,

On 20/05/26 11:53 AM, Michael Meissner wrote:
> Note, the tests are rather tricky, and I believe they will not work
> correctly if you configure the compiler to default to power9, power10,
> or power11 code.
> 
> The test has the guard condition:
> 
> /* { dg-require-effective-target powerpc_p8vector_ok } */
> /* { dg-options "-mdejagnu-cpu=power8 -O2 " } */
> 
> What -mdejagnu-cpu=power8 does is tell the test compiler to use
> -mcpu=power8 if the default target is not at the power8 level.  If you
> configure the compiler to default to power9, power10, or power11, using
> -mdejagnu-cpu=power8 will not change the default.

I built a compiler with --with-cpu=power10. And with this compiler if I
run a test that specifies -mdejagnu-cpu=power8, this option is honoured and power8
assembly is generated.
Am I missing something?

-Surya

> 
> Given that the byte swapping vector instructions were added in power9,
> if the default target is power9 or high, the p8swap support is turned
> off.
> 
> You could change the guard condition to:
> 
> /* { dg-require-effective-target powerpc_p8vector_ok } */
> /* { dg-options "-mdejagnu-cpu=power8 -O2 " } */
> 
> Or add the following line (with an explanation) in the source before
> the function in the test:
> 
> #pragma GCC target ("cpu=power8")
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.