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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-111.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* { dg-require-effective-target vect_float } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 16
7
 
8
int
9
main1 (void)
10
{
11
  int i;
12
  float a[N];
13
  float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
14
 
15
  /* Condition in loop.  */
16
  /* This loop is vectorized on platforms that support vect_condition.  */
17
  for (i = 0; i < N; i++)
18
  {
19
    a[i] = (b[i] > 0 ? b[i] : 0);
20
  }
21
 
22
  for (i = 0; i < N; i++)
23
  {
24
    if (a[i] != b[i])
25
        abort ();
26
  }
27
  return 0;
28
}
29
 
30
int main (void)
31
{
32
  check_vect ();
33
  return main1 ();
34
}
35
 
36
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target powerpc*-*-* } } } */
37
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target i?86-*-* x86_64-*-* ia64-*-* } } } */
38
/* { 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.