fold-vec-neg-char.c: New.
[testsuite] 2017-10-27 Will Schmidt <will_schmidt@vnet.ibm.com> * gcc.target/powerpc/fold-vec-neg-char.c: New. * gcc.target/powerpc/fold-vec-neg-floatdouble.c: New. * gcc.target/powerpc/fold-vec-neg-int.c: New. * gcc.target/powerpc/fold-vec-neg-longlong.c: New. * gcc.target/powerpc/fold-vec-neg-short.c: New. From-SVN: r254164
This commit is contained in:
parent
730de5a59e
commit
759ebd17e3
@ -1,3 +1,11 @@
|
||||
2017-10-27 Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
|
||||
* gcc.target/powerpc/fold-vec-neg-char.c: New.
|
||||
* gcc.target/powerpc/fold-vec-neg-floatdouble.c: New.
|
||||
* gcc.target/powerpc/fold-vec-neg-int.c: New.
|
||||
* gcc.target/powerpc/fold-vec-neg-longlong.c: New.
|
||||
* gcc.target/powerpc/fold-vec-neg-short.c: New.
|
||||
|
||||
2017-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/56342
|
||||
|
19
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-char.c
Normal file
19
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-char.c
Normal file
@ -0,0 +1,19 @@
|
||||
/* Verify that overloaded built-ins for vec_neg with char
|
||||
inputs produce the right code. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target powerpc_altivec_ok } */
|
||||
/* { dg-options "-maltivec -O2" } */
|
||||
|
||||
#include <altivec.h>
|
||||
|
||||
vector signed char
|
||||
test2 (vector signed char x)
|
||||
{
|
||||
return vec_neg (x);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "xxspltib|vspltisw|vxor" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vsububm" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vmaxsb" 0 } } */
|
||||
|
23
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-floatdouble.c
Normal file
23
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-floatdouble.c
Normal file
@ -0,0 +1,23 @@
|
||||
/* Verify that overloaded built-ins for vec_neg with float and
|
||||
double inputs for VSX produce the right code. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target powerpc_vsx_ok } */
|
||||
/* { dg-options "-mvsx -O2" } */
|
||||
|
||||
#include <altivec.h>
|
||||
|
||||
vector float
|
||||
test1 (vector float x)
|
||||
{
|
||||
return vec_neg (x);
|
||||
}
|
||||
|
||||
vector double
|
||||
test2 (vector double x)
|
||||
{
|
||||
return vec_neg (x);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "xvnegsp" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "xvnegdp" 1 } } */
|
18
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-int.c
Normal file
18
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-int.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* Verify that overloaded built-ins for vec_neg with int
|
||||
inputs produce the right code. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target powerpc_altivec_ok } */
|
||||
/* { dg-options "-maltivec -O2" } */
|
||||
|
||||
#include <altivec.h>
|
||||
|
||||
vector signed int
|
||||
test1 (vector signed int x)
|
||||
{
|
||||
return vec_neg (x);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "xxspltib|vspltisw|vxor" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vsubuwm" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vmaxsw" 0 } } */
|
18
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-longlong.c
Normal file
18
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-longlong.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* Verify that overloaded built-ins for vec_neg with long long
|
||||
inputs produce the right code. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target powerpc_p8vector_ok } */
|
||||
/* { dg-options "-mpower8-vector -O2" } */
|
||||
|
||||
#include <altivec.h>
|
||||
|
||||
vector signed long long
|
||||
test3 (vector signed long long x)
|
||||
{
|
||||
return vec_neg (x);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "xxspltib|vspltisw" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vsubudm" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vmaxsd" 0 } } */
|
18
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-short.c
Normal file
18
gcc/testsuite/gcc.target/powerpc/fold-vec-neg-short.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* Verify that overloaded built-ins for vec_neg with short
|
||||
inputs produce the right code. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target powerpc_altivec_ok } */
|
||||
/* { dg-options "-maltivec -O2" } */
|
||||
|
||||
#include <altivec.h>
|
||||
|
||||
vector signed short
|
||||
test3 (vector signed short x)
|
||||
{
|
||||
return vec_neg (x);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "xxspltib|vspltisw|vxor" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vsubuhm" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "vmaxsh" 0 } } */
|
Loading…
Reference in New Issue
Block a user