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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr21101.c] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -funroll-loops -march=nocona" } */
3
 
4
#include <mmintrin.h>
5
 
6
int W;
7
void f()
8
{
9
  int j;
10
  int B, C;
11
  unsigned char* S;
12
  __m64 *T = (__m64 *) &W;
13
 
14
  for (j = 0; j < 16; j++, T++)
15
  {
16
    T[0] = T[1] = _mm_set1_pi8(*S);
17
    S += W;
18
  }
19
 
20
  C = 3 * B;
21
 
22
  __m64 E = _mm_set_pi16(3 * B, 3 * B, 3 * B, 5 * B);
23
  __m64 G = _mm_set1_pi16(3 * B);
24
 
25
  for (j = 0; j < 16; j++)
26
  {
27
    __m64 R = _mm_set1_pi16(B + j * C);
28
    R = _m_paddw(R, E);
29
    R = _m_paddw(R, G);
30
    T[0] = _mm_srai_pi16(R, 3);
31
  }
32
}

powered by: WebSVN 2.1.0

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