| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-mavx512f -O2 -mfpmath=sse -ffast-math" } */ |
| 3 |
/* { dg-require-effective-target avx512f } */ |
| 4 |
|
| 5 |
#define AVX512F |
| 6 |
#ifndef CHECK |
| 7 |
#define CHECK "avx512f-helper.h" |
| 8 |
#endif |
| 9 |
|
| 10 |
#include CHECK |
| 11 |
|
| 12 |
#include "pr98309-1.c" |
| 13 |
|
| 14 |
double |
| 15 |
__attribute__((noipa, target("fpmath=387"))) |
| 16 |
foo_i387 (double a, int b) |
| 17 |
{ |
| 18 |
return __builtin_ldexp (a, b); |
| 19 |
} |
| 20 |
|
| 21 |
float |
| 22 |
__attribute__((noipa, target("fpmath=387"))) |
| 23 |
foo2_i387 (float a, int b) |
| 24 |
{ |
| 25 |
return __builtin_ldexpf (a, b); |
| 26 |
} |
| 27 |
|
| 28 |
static void |
| 29 |
test_512 (void) |
| 30 |
{ |
| 31 |
float fa = 14.5; |
| 32 |
double da = 44.5; |
| 33 |
int fb = 12; |
| 34 |
int db = 8; |
| 35 |
if (foo_i387 (da, db) != foo (da, db)) |
| 36 |
abort (); |
| 37 |
if (foo2_i387 (fa, fb) != foo2 (fa, fb)) |
| 38 |
abort (); |
| 39 |
} |