OSDN Git Service

2008-04-27 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-shift-1.c
index cdc2fde..346fffe 100644 (file)
@@ -1,28 +1,31 @@
 /* { dg-require-effective-target vect_shift } */
+/* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
-#include <signal.h>
+#include "tree-vect.h"
 
-#define N 16
-#define MAX 42
-
-extern void abort(void); 
+#define N 8
 
 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,
+                       0x08000000, 0x08000001, 0x0ff0000ff, 0xf0000001 };
+  unsigned int B[N] = { 0x01000000, 0x01000000, 0x01fe0001f, 0x1e000000,
+                       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;
 }
 
-
-
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */