Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse5-ima-vector.c
blobf32b0a13d0a41c4660af7abc4d91ceb0f3661dd9
1 /* Test that the compiler properly optimizes vector 32-bit integer point
2 multiply and add instructions vector into pmacsdd on SSE5 systems. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target lp64 } */
6 /* { dg-options "-O2 -msse5 -ftree-vectorize" } */
8 extern void exit (int);
10 typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
12 #define SIZE 10240
14 union {
15 __m128i align;
16 int i[SIZE];
17 } a, b, c, d;
19 void
20 int_mul_add (void)
22 int i;
24 for (i = 0; i < SIZE; i++)
25 a.i[i] = (b.i[i] * c.i[i]) + d.i[i];
28 int main ()
30 int_mul_add ();
31 exit (0);
34 /* { dg-final { scan-assembler "pmacsdd" } } */