diff gcc/testsuite/gcc.dg/vect/pr65518.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line diff
--- a/gcc/testsuite/gcc.dg/vect/pr65518.c	Fri Oct 27 22:46:09 2017 +0900
+++ b/gcc/testsuite/gcc.dg/vect/pr65518.c	Thu Oct 25 07:37:49 2018 +0900
@@ -1,10 +1,19 @@
 #include "tree-vect.h"
 
+#if VECTOR_BITS > 256
+#define NINTS (VECTOR_BITS / 32)
+#else
+#define NINTS 8
+#endif
+
+#define N (NINTS * 2)
+#define RESULT (NINTS * (NINTS - 1) / 2 * N + NINTS)
+
 extern void abort (void);
 
 typedef struct giga
 {
-  unsigned int g[16];
+  unsigned int g[N];
 } giga;
 
 unsigned long __attribute__((noinline,noclone))
@@ -19,17 +28,17 @@
 
 int main ()
 {
-  struct giga g[8];
+  struct giga g[NINTS];
   unsigned int n = 1;
   int i, j;
   check_vect ();
-  for (i = 0; i < 8; ++i)
-    for (j = 0; j < 16; ++j)
+  for (i = 0; i < NINTS; ++i)
+    for (j = 0; j < N; ++j)
       {
 	g[i].g[j] = n++;
 	__asm__ volatile ("");
       }
-  if (addfst (g, 8) != 456)
+  if (addfst (g, NINTS) != RESULT)
     abort ();
   return 0;
 }