[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr71977-2.c
blob85b7a2292d1cd2b85b89e912d1dec8b280ba0f35
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2" } */
6 #include <stdint.h>
8 typedef union
10 float value;
11 uint32_t word;
12 } ieee_float_shape_type;
14 float
15 mask_and_float_sign (float f)
17 ieee_float_shape_type u;
19 u.value = f;
20 u.word &= 0x80000000;
22 return u.value;
25 /* { dg-final { scan-assembler "\[ \t\]xxland " } } */
26 /* { dg-final { scan-assembler-not "\[ \t\]and " } } */
27 /* { dg-final { scan-assembler-not "\[ \t\]mfvsrd " } } */
28 /* { dg-final { scan-assembler-not "\[ \t\]stxv" } } */
29 /* { dg-final { scan-assembler-not "\[ \t\]lxv" } } */
30 /* { dg-final { scan-assembler-not "\[ \t\]srdi " } } */