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-vpermilps-256-1.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 129
9
#endif
10
 
11
void static
12
avx_test ()
13
{
14
    union256 src, u;
15
    float e[8] = {0.0};
16
 
17
    src.x = _mm256_set_ps (1, 2, 3, 4, 5, 6, 7, 8);
18
    u.x = _mm256_permute_ps(src.x, CTRL);
19
 
20
    e[0] = src.a[0 +  (CTRL & 0x03)];
21
    e[1] = src.a[0 + ((CTRL & 0x0c) >> 2)];
22
    e[2] = src.a[0 + ((CTRL & 0x30) >> 4)];
23
    e[3] = src.a[0 + ((CTRL & 0xc0) >> 6)];
24
    e[4] = src.a[4 +  (CTRL & 0x03)];
25
    e[5] = src.a[4 + ((CTRL & 0x0c) >> 2)];
26
    e[6] = src.a[4 + ((CTRL & 0x30) >> 4)];
27
    e[7] = src.a[4 + ((CTRL & 0xc0) >> 6)];
28
 
29
    if (check_union256 (u, e))
30
      abort ();
31
}

powered by: WebSVN 2.1.0

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