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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-96.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
/* { dg-add-options double_vectors } */
3
 
4
#include <stdarg.h>
5
#include "tree-vect.h"
6
 
7
#define N 16
8
 
9
struct tmp
10
{
11
     int x;
12
     int ia[N];
13
};
14
 
15
__attribute__ ((noinline))
16
int main1 (int off)
17
{
18
  struct tmp sb[N];
19
  struct tmp *pp = &sb[off];
20
  int i, ib[N];
21
 
22
  for (i = 0; i < N; i++)
23
      pp->ia[i] = ib[i];
24
 
25
  /* check results: */
26
  for (i = 0; i < N; i++)
27
    {
28
       if (pp->ia[i] != ib[i])
29
         abort();
30
    }
31
 
32
  return 0;
33
}
34
 
35
int main (void)
36
{
37
  check_vect ();
38
 
39
  return main1 (8);
40
}
41
 
42
/* The store is unaligned, the load is aligned. For targets that support unaligned
43
   loads, peel to align the store and generate an unaligned access for the load.
44
   For targets that don't support unaligned loads, version for the store.  */
45
 
46
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
47
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } } } } */
48
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */
49
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
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.