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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [sse-copysignf-vec.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -ftree-vectorize -msse" } */
3
/* { dg-require-effective-target sse } */
4
 
5
#include "sse-check.h"
6
 
7
extern float copysignf (float, float);
8
 
9
#define N 16
10
 
11
float a[N] = {-0.1f,-3.2f,-6.3f,-9.4f,-12.5f,-15.6f,-18.7f,-21.8f,24.9f,27.1f,30.2f,33.3f,36.4f,39.5f,42.6f,45.7f};
12
float b[N] = {-1.2f,3.4f,-5.6f,7.8f,-9.0f,1.0f,-2.0f,3.0f,-4.0f,-5.0f,6.0f,7.0f,-8.0f,-9.0f,10.0f,11.0f};
13
float r[N];
14
 
15
static void
16
sse_test (void)
17
{
18
  int i;
19
 
20
  for (i = 0; i < N; i++)
21
    r[i] = copysignf (a[i], b[i]);
22
 
23
  /* check results:  */
24
  for (i = 0; i < N; i++)
25
    if (r[i] != copysignf (a[i], b[i]))
26
      abort ();
27
}
28
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.