diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2002-01-08 04:52:36 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2002-01-08 04:52:36 +0000 |
commit | 70ec0b9b9faad0d709cd44be3247127caef73c12 (patch) | |
tree | cd13224137f90dfe2b25b7e55a1e7217d42a330b /gcc | |
parent | fa066a2379bafed5897d478c2dae6d953a7e4799 (diff) | |
download | gcc-70ec0b9b9faad0d709cd44be3247127caef73c12.zip gcc-70ec0b9b9faad0d709cd44be3247127caef73c12.tar.gz gcc-70ec0b9b9faad0d709cd44be3247127caef73c12.tar.bz2 |
* testsuite/gcc.dg/altivec-4.c: Test altivec predicates.
From-SVN: r48623
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/altivec-4.c | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d6de456..a4e5747 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +002-01-07 Aldy Hernandez <aldyh@redhat.com> + + * gcc.dg/altivec-4.c: Test altivec predicates. + 2002-01-07 Jakub Jelinek <jakub@redhat.com> * gcc.c-torture/execute/20020107-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/altivec-4.c b/gcc/testsuite/gcc.dg/altivec-4.c index 0dc3099..7ed3b9a 100644 --- a/gcc/testsuite/gcc.dg/altivec-4.c +++ b/gcc/testsuite/gcc.dg/altivec-4.c @@ -1,10 +1,33 @@ /* { dg-do compile { target powerpc-*-* } } */ /* { dg-options "-maltivec -O0 -Wall" } */ +#define vector __attribute__((vector_size(16))) + int __attribute__((mode(V4SI))) x, y; +vector int i,j,k; +vector short s,t,u; +vector char c,d,e; +vector float f,g,h; + void b() { __builtin_altivec_vadduwm (x, y); + + /* Make sure the predicates accept correct argument types. */ + + k = __builtin_altivec_vcmpbfp_p (f, g); + k = __builtin_altivec_vcmpeqfp_p (f, g); + k = __builtin_altivec_vcmpequb_p (c, d); + k = __builtin_altivec_vcmpequh_p (s, t); + k = __builtin_altivec_vcmpequw_p (i, j); + k = __builtin_altivec_vcmpgefp_p (f, g); + k = __builtin_altivec_vcmpgtfp_p (f, g); + k = __builtin_altivec_vcmpgtsb_p (c, d); + k = __builtin_altivec_vcmpgtsh_p (s, t); + k = __builtin_altivec_vcmpgtsw_p (i, j); + k = __builtin_altivec_vcmpgtub_p (c, d); + k = __builtin_altivec_vcmpgtuh_p (s, t); + k = __builtin_altivec_vcmpgtuw_p (i, j); } |