OSDN Git Service

Increase array sizes in vect-tests to enable 256-bit vectorization
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-reduc-pattern-1c.c
index 872e6e8..5394ade 100644 (file)
@@ -3,10 +3,11 @@
 #include <stdarg.h>
 #include "tree-vect.h"
 
-#define N 16
-unsigned char udata_ch[N] =
-  { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 };
-#define SUM 210
+#define N 128
+unsigned char udata_ch[N];
+#define SUM N*(N-1)
+
+volatile int y = 0;
 
 __attribute__ ((noinline)) int
 foo ()
@@ -14,6 +15,14 @@ foo ()
   int i;
   unsigned short shortsum = 0;
 
+  for (i = 0; i < N; i++)
+    {
+      udata_ch[i] = i*2;
+      /* Avoid vectorization.  */
+      if (y)
+       abort ();
+    }
+
   /* widenning sum: sum chars into short.  */
   for (i = 0; i < N; i++)
     {