From: Carl Love Date: Mon, 11 Jun 2018 16:38:42 +0000 (+0000) Subject: altivec-7.c (main): Remove tests vec_unpackh(vecubi[0]) and vec_unpackl(vecubi[0... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26029dbef7ee86c41de966163481b29c0d578bdc;p=gcc.git altivec-7.c (main): Remove tests vec_unpackh(vecubi[0]) and vec_unpackl(vecubi[0]) returning long... gcc/testsuite/ChangeLog: 2018-06-11 Carl Love * gcc.target/powerpc/altivec-7.c (main): Remove tests vec_unpackh(vecubi[0]) and vec_unpackl(vecubi[0]) returning long long bool. Remove duplicate dg-final for xxlxor. Update dg-final instruction counts. * gcc.target/powerpc/altivec-37.c (main): New file for tests vec_unpackh and vec_unpackl returning long long bool and long long int. From-SVN: r261438 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5c14949e1d7..27201df4ef7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2018-06-11 Carl Love + * gcc.target/powerpc/altivec-7.c (main): Remove tests + vec_unpackh(vecubi[0]) and vec_unpackl(vecubi[0]) returning + long long bool. Remove duplicate dg-final for xxlxor. Update + dg-final instruction counts. + * gcc.target/powerpc/altivec-37.c (main): New file for + tests vec_unpackh and vec_unpackl returning long long bool and + long long int. + 2018-06-11 Martin Liska PR tree-optimization/86089 diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-37.c b/gcc/testsuite/gcc.target/powerpc/altivec-37.c new file mode 100644 index 00000000000..06d4bb155f0 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/altivec-37.c @@ -0,0 +1,32 @@ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-options "-mpower8-vector -mvsx" } */ + +#include + +vector bool int *vecubi; +vector bool long long *vecublli; +vector signed int *vecsi; +vector signed long long int *vecslli; + +int main () +{ + + /* use of ‘long long’ in AltiVec types requires -mvsx */ + /* __builtin_altivec_vupkhsw and __builtin_altivec_vupklsw + requires the -mpower8-vector option */ + *vecublli++ = vec_unpackh(vecubi[0]); + *vecublli++ = vec_unpackl(vecubi[0]); + *vecslli++ = vec_unpackh(vecsi[0]); + *vecslli++ = vec_unpackl(vecsi[0]); + + return 0; +} + +/* Expected results: + vec_unpackh vupklsw + vec_unpackl vupkhsw +*/ + +/* { dg-final { scan-assembler-times "vupklsw" 2 } } */ +/* { dg-final { scan-assembler-times "vupkhsw" 2 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-7.c b/gcc/testsuite/gcc.target/powerpc/altivec-7.c index 6aad9a9cbe3..b61092cec67 100644 --- a/gcc/testsuite/gcc.target/powerpc/altivec-7.c +++ b/gcc/testsuite/gcc.target/powerpc/altivec-7.c @@ -18,7 +18,6 @@ vector unsigned int *vecuint; vector bool int *vecubi; vector bool char *vecubci; vector bool short int *vecubsi; -vector bool long long int *vecublli; vector unsigned short *vecushort; vector bool int *vecbint; vector float *vecfloat; @@ -50,13 +49,11 @@ int main () *vecubi++ = vec_unpackh(vecubsi[0]); *vecuint++ = vec_unpackh(varpixel[0]); - *vecublli++ = vec_unpackh(vecubi[0]); *vecubsi++ = vec_unpackh(vecubci[0]); *vecshort++ = vec_unpackh(vecchar[0]); *vecubi++ = vec_unpackl(vecubsi[0]); *vecuint++ = vec_unpackl(varpixel[0]); - *vecublli++ = vec_unpackl(vecubi[0]); *vecubsi++ = vec_unpackl(vecubci[0]); *vecshort++ = vec_unpackl(vecchar[0]); @@ -72,11 +69,9 @@ int main () vec_lvewx lvewx vec_unpackh vupklsh vec_unpackh vupklpx - vec_unpackh vupklsw vec_unpackh vupklsb vec_unpackl vupkhsh vec_unpackl vupkhpx - vec_unpackl vupkhsw vec_unpackl vupkhsb vec_andc xxnor xxland @@ -90,7 +85,7 @@ int main () /* { dg-final { scan-assembler-times "vpkpx" 2 } } */ /* { dg-final { scan-assembler-times "vmulesb" 1 } } */ /* { dg-final { scan-assembler-times "vmulosb" 1 } } */ -/* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxv\M} 44 { target le } } } */ +/* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxv\M} 42 { target le } } } */ /* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxv\M} 4 { target be } } } */ /* { dg-final { scan-assembler-times "lvewx" 2 } } */ /* { dg-final { scan-assembler-times "lvxl" 1 } } */ @@ -100,12 +95,10 @@ int main () /* { dg-final { scan-assembler-times "xxland" 4 } } */ /* { dg-final { scan-assembler-times "xxlxor" 5 } } */ /* { dg-final { scan-assembler-times "xxlandc" 0 } } */ -/* { dg-final { scan-assembler-times "xxlxor" 5 } } */ /* { dg-final { scan-assembler-times "lvx" 1 } } */ /* { dg-final { scan-assembler-times "vmsumubm" 1 } } */ /* { dg-final { scan-assembler-times "vupklpx" 1 } } */ /* { dg-final { scan-assembler-times "vupklsx" 0 } } */ /* { dg-final { scan-assembler-times "vupklsb" 2 } } */ /* { dg-final { scan-assembler-times "vupkhpx" 1 } } */ -/* { dg-final { scan-assembler-times "vupkhsw" 1 } } */ /* { dg-final { scan-assembler-times "vupkhsb" 2 } } */