Add compile command to each testcase
[gcc-vect-testsuite.git] / vect-outer-2.c
blob38701977bc6c28c5fd35d9f26ccb92af4b6507ac
1 /* { dg-require-effective-target vect_float } */
2 /* { dg-require-effective-target vect_intfloat_cvt } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 40
7 float image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
8 float out[N];
10 /* Outer-loop vectorization. */
12 __attribute__ ((noinline)) void
13 foo (){
14 int i,j;
16 for (i = 0; i < N; i++) {
17 for (j = 0; j < N; j++) {
18 image[j][i] = j+i;
23 int main (void)
25 check_vect ();
26 int i, j;
28 foo ();
30 for (i = 0; i < N; i++) {
31 for (j = 0; j < N; j++) {
32 if (image[j][i] != j+i)
33 abort ();
37 return 0;
40 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
41 /* { dg-final { cleanup-tree-dump "vect" } } */