2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr59523.c
blobb523eaea8a1516e21e96e62f08756977d9b9b2c3
1 /* PR tree-optimization/59523 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3" } */
4 /* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */
6 int *
7 foo (int a, int *b, int *c, int *d)
9 int i, *r = __builtin_alloca (a * sizeof (int));
10 __builtin_memcpy (r, d, a * sizeof (int));
11 for (i = 0; i < 64; i++)
12 c[i] += b[i];
13 for (i = 0; i < a; i++)
14 if (r[i] == 0)
15 r[i] = 1;
16 return r;