URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 318 |
Rev 338 |
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-require-effective-target avx } */
|
/* { dg-require-effective-target avx } */
|
/* { dg-options "-O2 -mavx" } */
|
/* { dg-options "-O2 -mavx" } */
|
|
|
#include "avx-check.h"
|
#include "avx-check.h"
|
|
|
void static
|
void static
|
avx_test (void)
|
avx_test (void)
|
{
|
{
|
int i;
|
int i;
|
union256 s1;
|
union256 s1;
|
union256i_d u;
|
union256i_d u;
|
int e [8];
|
int e [8];
|
|
|
s1.x = _mm256_set_ps (45.64, 4564.56, 2.3, 5.5, 57.57, 89.34, 54.12, 954.67);
|
s1.x = _mm256_set_ps (45.64, 4564.56, 2.3, 5.5, 57.57, 89.34, 54.12, 954.67);
|
u.x = _mm256_cvttps_epi32 (s1.x);
|
u.x = _mm256_cvttps_epi32 (s1.x);
|
|
|
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
e[i] = (int)s1.a[i];
|
e[i] = (int)s1.a[i];
|
|
|
if (check_union256i_d (u, e))
|
if (check_union256i_d (u, e))
|
abort ();
|
abort ();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.