* testsuite/gcc.dg/altivec-4.c: Test altivec predicates.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 8 Jan 2002 04:52:36 +0000 (04:52 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Tue, 8 Jan 2002 04:52:36 +0000 (04:52 +0000)
From-SVN: r48623

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/altivec-4.c

index d6de456f99187e70966db5555dbcca619a4af235..a4e57472cf0618458489f419d35c9daaaada8ae6 100644 (file)
@@ -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.
index 0dc3099983f1f1436dfe1ba03d04da0f16dcfb6f..7ed3b9aaeb51baced59d620ceacacbde63ddcbaa 100644 (file)
@@ -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);
 }