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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [costmodel/] [ppc/] [costmodel-vect-33.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-effective-target vect_int } */
3
 
4
#include <stdarg.h>
5
#include "../../tree-vect.h"
6
 
7
#define N 16
8
struct test {
9
  char ca[N];
10
};
11
 
12
extern struct test s;
13
 
14
int main1 ()
15
{
16
  int i;
17
 
18
  for (i = 0; i < N; i++)
19
    {
20
      s.ca[i] = 5;
21
    }
22
 
23
  /* check results:  */
24
  for (i = 0; i < N; i++)
25
    {
26
      if (s.ca[i] != 5)
27
        abort ();
28
    }
29
 
30
  return 0;
31
}
32
 
33
int main (void)
34
{
35
  return main1 ();
36
}
37
 
38
/* Peeling to align the store is used. Overhead of peeling is too high.  */
39
/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target vector_alignment_reachable } } } */
40
 
41
/* Versioning to align the store is used. Overhead of versioning is not too high.  */
42
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target {! vector_alignment_reachable} } } } */
43
/* { 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.