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-4.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_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 128
7
 
8
int ib[N+7];
9
int ia[N+1];
10
 
11
__attribute__ ((noinline))
12
int main1 ()
13
{
14
  int i;
15
 
16
  /* Don't peel keeping one load and the store aligned.  */
17
  for (i = 0; i <= N; i++)
18
    {
19
      ia[i] = ib[i] + ib[i+5];
20
    }
21
 
22
  /* check results:  */
23
  for (i = 1; i <= N; i++)
24
    {
25
      if (ia[i] != ib[i] + ib[i+5])
26
        abort ();
27
    }
28
 
29
  return 0;
30
}
31
 
32
int main (void)
33
{
34
  int i;
35
 
36
  check_vect ();
37
 
38
  for (i = 0; i <= N+6; i++)
39
    {
40
      asm volatile ("" : "+r" (i));
41
      ib[i] = i;
42
    }
43
 
44
  return main1 ();
45
}
46
 
47
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
48
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail vect_no_align } } } */
49
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
50
/* { 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.