OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-outer-3b.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-require-effective-target vect_float } */
2
#include <stdarg.h>
3
#include "tree-vect.h"
4
 
5
#define N 40
6
float image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7
float out[N];
8
 
9
/* Outer-loop vectorization with non-consecutive access. Not vectorized yet.  */
10
 
11
__attribute__ ((noinline)) void
12
foo (){
13
  int i,j;
14
  float diff;
15
 
16
  for (i = 0; i < N/2; i++) {
17
    diff = 0;
18
    for (j = 0; j < N; j++) {
19
      diff += image[j][2*i];
20
    }
21
    out[i]=diff;
22
  }
23
}
24
 
25
int main (void)
26
{
27
  check_vect ();
28
  int i, j;
29
  float diff;
30
 
31
  for (i = 0; i < N; i++) {
32
    for (j = 0; j < N; j++) {
33
      image[i][j]=i+j;
34
    }
35
  }
36
 
37
  foo ();
38
 
39
  for (i = 0; i < N/2; i++) {
40
    diff = 0;
41
    for (j = 0; j < N; j++) {
42
      diff += image[j][2*i];
43
    }
44
    if (out[i] != diff)
45
      abort ();
46
  }
47
 
48
  return 0;
49
}
50
 
51
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
52
/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { xfail vect_multiple_sizes } } } */
53
/* { dg-final { scan-tree-dump-times "strided access in outer loop" 4 "vect" { target vect_multiple_sizes } } } */
54
/* { dg-final { cleanup-tree-dump "vect" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.