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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [no-trapping-math-2.c] - Blame information for rev 689

Details | Compare with Previous | View Log

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