* gcc.dg/vect/vect-shift-1.c: Include tree-vect.h header. Check
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Oct 2005 08:47:29 +0000 (08:47 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Oct 2005 08:47:29 +0000 (08:47 +0000)
if target supports vector instructions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104980 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-shift-1.c

index 97e547f..62ca00c 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-05  Uros Bizjak  <uros@kss-loka.si>
+
+       * gcc.dg/vect/vect-shift-1.c: Include tree-vect.h header. Check
+       if target supports vector instructions.
+
 2005-10-04  Geoffrey Keating  <geoffk@apple.com>
 
        * gcc.dg/builtins-config.h: Only PowerPC Mac OS shipped without
index 7507016..c2e5464 100644 (file)
@@ -1,22 +1,26 @@
 /* { dg-require-effective-target vect_shift } */
 
 #include <stdarg.h>
-#include <signal.h>
+#include "tree-vect.h"
 
-extern void abort(void); 
+#define N 4
 
 int main ()
-{  
-  unsigned int A[4] =  {0x08000000,0x08000001,0xff0000ff,0xf0000001};
-  unsigned int Answer[4] = {0x01000000,0x01000000,0x01fe0001f,0x1e000000};
-  unsigned int B[4];
-  int i, j;
-  
-  for (i=0; i<4; i++)
-    B[i] = A[i] >> 3;
-  for (i=0; i<4; i++)
-    if (B[i] != Answer[i])
+{
+  unsigned int A[N] = { 0x08000000, 0x08000001, 0x0ff0000ff, 0xf0000001 };
+  unsigned int B[N] = { 0x01000000, 0x01000000, 0x01fe0001f, 0x1e000000 };
+  int i;
+
+  check_vect ();
+
+  for (i = 0; i < N; i++)
+    A[i] = A[i] >> 3;
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    if (A[i] != B[i])
       abort ();
+
   return 0;
 }