comparison gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.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
6 #define N 256 6 #define N 256
7 7
8 unsigned char ub[N]; 8 unsigned char ub[N];
9 unsigned char uc[N]; 9 unsigned char uc[N];
10 unsigned char diff; 10 unsigned char diff;
11
12 volatile int y = 0;
13 11
14 __attribute__ ((noinline)) void 12 __attribute__ ((noinline)) void
15 main1 (unsigned char x, unsigned char max_result, unsigned char min_result) 13 main1 (unsigned char x, unsigned char max_result, unsigned char min_result)
16 { 14 {
17 int i; 15 int i;
31 if (uc[i] > max_result) 29 if (uc[i] > max_result)
32 max_result = uc[i]; 30 max_result = uc[i];
33 if (uc[i] < min_result) 31 if (uc[i] < min_result)
34 min_result = uc[i]; 32 min_result = uc[i];
35 33
36 /* Avoid vectorization. */ 34 asm volatile ("" ::: "memory");
37 if (y)
38 abort ();
39 } 35 }
40 for (i = 0; i < N; i++) { 36 for (i = 0; i < N; i++) {
41 udiff += (unsigned char) (ub[i] - uc[i]); 37 udiff += (unsigned char) (ub[i] - uc[i]);
42 } 38 }
43 39