OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [costmodel/] [ppc/] [costmodel-slp-33.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "../../tree-vect.h"
5
 
6
#define N 32
7
 
8
struct s{
9
  short a;      /* aligned */
10
  char b[N-1];  /* unaligned (offset 2B) */
11
};
12
 
13
int main1 ()
14
{
15
  int i;
16
  struct s tmp;
17
 
18
  /* unaligned */
19
  for (i = 0; i < N/4; i++)
20
    {
21
      tmp.b[2*i] = 5;
22
      tmp.b[2*i+1] = 15;
23
    }
24
 
25
  /* check results:  */
26
  for (i = 0; i <N/4; i++)
27
    {
28
      if (tmp.b[2*i] != 5
29
          || tmp.b[2*i+1] != 15)
30
        abort ();
31
    }
32
 
33
  return 0;
34
}
35
 
36
int main (void)
37
{
38
  check_vect ();
39
 
40
  return main1 ();
41
}
42
 
43
/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
44
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
45
/* { 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.