mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-19 22:31:07 +08:00
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 <cel@us.ibm.com> * 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
This commit is contained in:
parent
ee6760c291
commit
26029dbef7
@ -1,3 +1,12 @@
|
||||
2018-06-11 Carl Love <cel@us.ibm.com>
|
||||
* 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 <mliska@suse.cz>
|
||||
|
||||
PR tree-optimization/86089
|
||||
|
32
gcc/testsuite/gcc.target/powerpc/altivec-37.c
Normal file
32
gcc/testsuite/gcc.target/powerpc/altivec-37.c
Normal file
@ -0,0 +1,32 @@
|
||||
/* { dg-do compile { target powerpc*-*-* } } */
|
||||
/* { dg-require-effective-target powerpc_p8vector_ok } */
|
||||
/* { dg-options "-mpower8-vector -mvsx" } */
|
||||
|
||||
#include <altivec.h>
|
||||
|
||||
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 } } */
|
@ -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 } } */
|
||||
|
Loading…
x
Reference in New Issue
Block a user