| 1 |
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ |
| 2 |
/* { dg-skip-if "" { powerpc*-*-darwin* } } */ |
| 3 |
/* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2" } */ |
| 4 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 5 |
|
| 6 |
#include <stdint.h> |
| 7 |
|
| 8 |
typedef union |
| 9 |
{ |
| 10 |
float value; |
| 11 |
uint32_t word; |
| 12 |
} ieee_float_shape_type; |
| 13 |
|
| 14 |
float |
| 15 |
mask_and_float_var (float f, uint32_t mask) |
| 16 |
{ |
| 17 |
ieee_float_shape_type u; |
| 18 |
|
| 19 |
u.value = f; |
| 20 |
u.word &= mask; |
| 21 |
|
| 22 |
return u.value; |
| 23 |
} |
| 24 |
|
| 25 |
/* { dg-final { scan-assembler {\mxxland\M} } } */ |
| 26 |
/* { dg-final { scan-assembler-not {\mand\M} } } */ |
| 27 |
/* { dg-final { scan-assembler-not {\mmfvsrd\M} } } */ |
| 28 |
/* { dg-final { scan-assembler-not {\mstxv\M} } } */ |
| 29 |
/* { dg-final { scan-assembler-not {\mlxv\M} } } */ |
| 30 |
/* { dg-final { scan-assembler-not {\msrdi\M} } } */ |