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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-peel-1.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 128
7
 
8
int ib[N+7];
9
 
10
__attribute__ ((noinline))
11
int main1 ()
12
{
13
  int i;
14
  int ia[N+1];
15
 
16
  /* All the accesses are misaligned. With cost model disabled, we
17
     count the number of aligned accesses for each peeling option, and
18
     in this case we align the two loads if possible (i.e., if
19
     misaligned stores are supported).  */
20
  for (i = 1; i <= N; i++)
21
    {
22
      ia[i] = ib[i+2] + ib[i+6];
23
    }
24
 
25
  /* check results:  */
26
  for (i = 1; i <= N; i++)
27
    {
28
      if (ia[i] != ib[i+2] + ib[i+6])
29
        abort ();
30
    }
31
 
32
  return 0;
33
}
34
 
35
int main (void)
36
{
37
  int i;
38
 
39
  check_vect ();
40
 
41
  for (i = 0; i <= N+6; i++)
42
    {
43
      asm volatile ("" : "+r" (i));
44
      ib[i] = i;
45
    }
46
 
47
  return main1 ();
48
}
49
 
50
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
51
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
52
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
53
/* { 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.