| 1 |
/* PR tree-optimization/114566 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-options "-O3 -mavx512f" } */ |
| 4 |
/* { dg-additional-options "-fstack-protector-strong" { target fstack_protector } } */ |
| 5 |
/* { dg-require-effective-target avx512f } */ |
| 6 |
|
| 7 |
#define AVX512F |
| 8 |
#include "avx512f-helper.h" |
| 9 |
|
| 10 |
__attribute__((noipa)) int |
| 11 |
foo (float x, float y) |
| 12 |
{ |
| 13 |
float a[8][56]; |
| 14 |
__builtin_memset (a, 0, sizeof (a)); |
| 15 |
|
| 16 |
for (int j = 0; j < 8; j++) |
| 17 |
for (int k = 0; k < 56; k++) |
| 18 |
{ |
| 19 |
float b = k * y; |
| 20 |
if (b < 0.) |
| 21 |
b = 0.; |
| 22 |
if (b > 0.) |
| 23 |
b = 0.; |
| 24 |
a[j][k] += b; |
| 25 |
} |
| 26 |
|
| 27 |
return __builtin_log (x); |
| 28 |
} |
| 29 |
|
| 30 |
void |
| 31 |
TEST (void) |
| 32 |
{ |
| 33 |
foo (86.25f, 0.625f); |
| 34 |
} |