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/] [avx-vpermilpd-2.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-require-effective-target avx } */
3
/* { dg-options "-O2 -mavx" } */
4
 
5
#include "avx-check.h"
6
 
7
#ifndef CTRL
8
#define CTRL 2
9
#endif
10
 
11
#define mask_v(pos) (((CTRL & (1ULL << (pos))) >> (pos)) << 1)
12
 
13
void static
14
avx_test ()
15
{
16
    union128d u, src;
17
    union128i_q ctl;
18
 
19
    double  s[2] = {9674.67456, 13543.9788};
20
    long long m[2] = {mask_v(0), mask_v(1)};
21
    double  e[2];
22
 
23
    src.x = _mm_loadu_pd(s);
24
    ctl.x = _mm_loadu_si128((__m128i*) m);
25
    u.x = _mm_permutevar_pd(src.x, ctl.x);
26
 
27
    e[0] = s[((m[0] & 0x02) >> 1)];
28
    e[1] = s[((m[1] & 0x02) >> 1)];
29
 
30
    if (check_union128d (u, e))
31
      abort ();
32
}
33
 

powered by: WebSVN 2.1.0

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