[PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

Segher Boessenkool segher@kernel.crashing.org
Mon Oct 11 15:30:50 GMT 2021


Hi!

On Mon, Oct 11, 2021 at 10:47:00AM +0800, Kewen.Lin wrote:
> As PR102658 shows, commit r12-4240 enables vectorization at O2,
> some cases need to be adjusted accordingly for rs6000 port.
> 
> - For target specific test cases, this adds -fno-tree-vectorize
> to retain original test points, otherwise vectorization can
> make some expected scalar instructions gone or generate some
> unexpected instructions for vector construction.

Ah good choice.

> - For generic test cases, it follows the existing suggested
> practice with necessary target/xfail selector.

Not such a great choice.  Many of those tests do not make sense with
vectorisation enabled.  This should have been thought about, in some
cases resulting in not running the test with vectorisation enabled, and
in some cases duplicating the test, once with and once without
vectorisation.

But you are just following established practice, so :-)

> -  struct A1 a = { 0, { 1 } };   // { dg-warning "\\\[-Wstringop-overflow" "" { target { i?86-*-* x86_64-*-* } } }
> +  struct A1 a = { 0, { 1 } };   // { dg-warning "\\\[-Wstringop-overflow" "" { target { i?86-*-* x86_64-*-* powerpc*-*-* } } }

I don't know if powerpc*-*-* is the correct choice in all these cases.
Sometimes it might have to be powerpc*-*-linux* or similar.  We'll find
out :-)

(An xfail causes XPASS if the test does *not* fail).

> +/* Now O2 enables vectorization by default, which generates unexpected float
> +   conversion for vector construction, so simply disable it.  */

It is good to see these comments.  I love puzzles, but not in the
testsuite! :-)

Okay for trunk.  Thanks!


Segher


More information about the Gcc-patches mailing list