Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / pr21101.c
blob104b08cd2a90e55e2c04cf66e0fb00f5233aed5e
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -funroll-loops -march=nocona" } */
4 #include <mmintrin.h>
6 int W;
7 void f()
9 int j;
10 int B, C;
11 unsigned char* S;
12 __m64 *T = (__m64 *) &W;
14 for (j = 0; j < 16; j++, T++)
16 T[0] = T[1] = _mm_set1_pi8(*S);
17 S += W;
20 C = 3 * B;
22 __m64 E = _mm_set_pi16(3 * B, 3 * B, 3 * B, 5 * B);
23 __m64 G = _mm_set1_pi16(3 * B);
25 for (j = 0; j < 16; j++)
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);