[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr97142.c
blobdd10b065134f35ea1731d58adb096c64e706c4e8
1 /* { dg-do compile } */
2 /* { dg-options "-Ofast -mdejagnu-cpu=power7" } */
4 #include <math.h>
6 float test1 (float x, float y)
8 return fmodf (x, y);
11 double test2 (double x, double y)
13 return fmod (x, y);
16 float test3 (float x, float y)
18 return remainderf (x, y);
21 double test4 (double x, double y)
23 return remainder (x, y);
26 /* { dg-final { scan-assembler-not {(?n)\mb.*fmod} } } */
27 /* { dg-final { scan-assembler-not {(?n)\mb.*fmodf} } } */
28 /* { dg-final { scan-assembler-not {(?n)\mb.*remainder} } } */
29 /* { dg-final { scan-assembler-not {(?n)\mb.*remainderf} } } */
30 /* { dg-final { scan-assembler-times {\mfdiv\M} 2 } } */
31 /* { dg-final { scan-assembler-times {\mfdivs\M} 2 } } */
32 /* { dg-final { scan-assembler-times {\mfnmsub\M} 2 } } */
33 /* { dg-final { scan-assembler-times {\mfnmsubs\M} 2 } } */
34 /* { dg-final { scan-assembler-times {\mfriz\M} 2 } } */
35 /* { dg-final { scan-assembler-times {\mfrin\M} 2 } } */