Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/vect/vect-105.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
14 | 14 |
15 static int a[N][N] = {{1,2,3,11},{4,5,6,12},{7,8,9,13},{34,45,67,83}}; | 15 static int a[N][N] = {{1,2,3,11},{4,5,6,12},{7,8,9,13},{34,45,67,83}}; |
16 static int b[N][N] = {{17,28,15,23},{0,2,3,24},{4,31,82,25},{29,31,432,256}}; | 16 static int b[N][N] = {{17,28,15,23},{0,2,3,24},{4,31,82,25},{29,31,432,256}}; |
17 static int c[N][N] = {{1,2,3,11},{4,9,13,34},{45,67,83,13},{34,45,67,83}}; | 17 static int c[N][N] = {{1,2,3,11},{4,9,13,34},{45,67,83,13},{34,45,67,83}}; |
18 | 18 |
19 volatile int y; | |
20 | |
21 __attribute__ ((noinline)) | 19 __attribute__ ((noinline)) |
22 int main1 (int x) { | 20 int main1 (int x) { |
23 int i,j; | 21 int i,j; |
24 struct extraction *p; | 22 struct extraction *p; |
25 p = (struct extraction *) malloc (sizeof (struct extraction)); | 23 p = (struct extraction *) malloc (sizeof (struct extraction)); |
28 { | 26 { |
29 for (j = 0; j < N; j++) | 27 for (j = 0; j < N; j++) |
30 { | 28 { |
31 p->a[i][j] = a[i][j]; | 29 p->a[i][j] = a[i][j]; |
32 p->b[i][j] = b[i][j]; | 30 p->b[i][j] = b[i][j]; |
33 /* Because Y is volatile, the compiler cannot move this check out | 31 asm volatile ("" ::: "memory"); |
34 of the loop. */ | |
35 if (y) | |
36 abort (); /* to avoid vectorization */ | |
37 } | 32 } |
38 } | 33 } |
39 | 34 |
40 /* Vectorizable: distance > number of iterations. */ | 35 /* Vectorizable: distance > number of iterations. */ |
41 for (i = 1; i < N; i++) | 36 for (i = 1; i < N; i++) |