This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, rs6000] testcase coverage for vec_perm built-ins


Hi Will,

On Thu, Aug 17, 2017 at 09:19:23AM -0500, Will Schmidt wrote:
> Add some Testcase coverage for the vector permute intrinsics.
> 
> Tested across power platforms.  OK for trunk?

> 	* gcc.target/powerpc/fold-vec-perm-char.c: New.
> 	* gcc.target/powerpc/fold-vec-perm-double.c: New.
> 	* gcc.target/powerpc/fold-vec-perm-float.c: New.
> 	* gcc.target/powerpc/fold-vec-perm-int.c: New.
> 	* gcc.target/powerpc/fold-vec-perm-longlong.c: New.
> 	* gcc.target/powerpc/fold-vec-perm-pixel.c: New.
> 	* gcc.target/powerpc/fold-vec-perm-short.c: New.

> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-double.c
> @@ -0,0 +1,16 @@
> +/* Verify that overloaded built-ins for vec_perm with 
> +   double inputs produce the right results.  */

That suggests it is a run test, but it's not.  s/results/code/ maybe?
(Same in other tests).

> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-float.c
> @@ -0,0 +1,16 @@
> +/* Verify that overloaded built-ins for vec_perm with float
> +   inputs produce the right results.  */
> +
> +/* { dg-do compile } */
> +/* { dg-require-effective-target powerpc_vsx_ok } */
> +/* { dg-options "-maltivec -O2" } */

vsx vs. altivec again.  You probably just need to add a comment what this
is about, or you can use -mvsx instead.

> new file mode 100644
> index 0000000..9f5c786
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-pixel.c
> @@ -0,0 +1,16 @@
> +/* Verify that overloaded built-ins for vec_perm with pixel
> +   inputs produce the right results.  */
> +
> +/* { dg-do compile } */
> +/* { dg-require-effective-target powerpc_vsx_ok } */
> +/* { dg-options "-mvsx -O2" } */

Why vsx for pixel?  It's an altivec thing.


Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]