Mercurial > hg > CbC > CbC_gcc
comparison 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 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 #include "tree-vect.h" | 1 #include "tree-vect.h" |
2 | |
3 #if VECTOR_BITS > 256 | |
4 #define NINTS (VECTOR_BITS / 32) | |
5 #else | |
6 #define NINTS 8 | |
7 #endif | |
8 | |
9 #define N (NINTS * 2) | |
10 #define RESULT (NINTS * (NINTS - 1) / 2 * N + NINTS) | |
2 | 11 |
3 extern void abort (void); | 12 extern void abort (void); |
4 | 13 |
5 typedef struct giga | 14 typedef struct giga |
6 { | 15 { |
7 unsigned int g[16]; | 16 unsigned int g[N]; |
8 } giga; | 17 } giga; |
9 | 18 |
10 unsigned long __attribute__((noinline,noclone)) | 19 unsigned long __attribute__((noinline,noclone)) |
11 addfst(giga const *gptr, int num) | 20 addfst(giga const *gptr, int num) |
12 { | 21 { |
17 return retval; | 26 return retval; |
18 } | 27 } |
19 | 28 |
20 int main () | 29 int main () |
21 { | 30 { |
22 struct giga g[8]; | 31 struct giga g[NINTS]; |
23 unsigned int n = 1; | 32 unsigned int n = 1; |
24 int i, j; | 33 int i, j; |
25 check_vect (); | 34 check_vect (); |
26 for (i = 0; i < 8; ++i) | 35 for (i = 0; i < NINTS; ++i) |
27 for (j = 0; j < 16; ++j) | 36 for (j = 0; j < N; ++j) |
28 { | 37 { |
29 g[i].g[j] = n++; | 38 g[i].g[j] = n++; |
30 __asm__ volatile (""); | 39 __asm__ volatile (""); |
31 } | 40 } |
32 if (addfst (g, 8) != 456) | 41 if (addfst (g, NINTS) != RESULT) |
33 abort (); | 42 abort (); |
34 return 0; | 43 return 0; |
35 } | 44 } |
36 | 45 |
37 /* We don't want to vectorize the single-element interleaving in the way | 46 /* We don't want to vectorize the single-element interleaving in the way |