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-3.c] - Blame information for rev 749

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
#define RES 21640 
8
 
9
int ib[N+10];
10
int ia[N+10];
11
int ic[N+10];
12
 
13
__attribute__ ((noinline))
14
int main1 ()
15
{
16
  int i, suma = 0, sumb = 0, sumc = 0;
17
 
18
  /* ib and ic have same misalignment, we peel to align them.  */
19
  for (i = 0; i <= N; i++)
20
    {
21
      suma += ia[i];
22
      sumb += ib[i+5];
23
      sumc += ic[i+1];
24
    }
25
 
26
  /* check results:  */
27
  if (suma + sumb + sumc != RES)
28
    abort ();
29
 
30
  return 0;
31
}
32
 
33
int main (void)
34
{
35
  int i;
36
 
37
  check_vect ();
38
 
39
  for (i = 0; i < N+10; i++)
40
    {
41
      asm volatile ("" : "+r" (i));
42
      ib[i] = i;
43
      ic[i] = i+2;
44
      ia[i] = i/2;
45
    }
46
 
47
  return main1 ();
48
}
49
 
50
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
51
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail { { vect_no_align } || {vect_sizes_32B_16B } } } } } */
52
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || {vect_sizes_32B_16B } } } } } */
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.