Debian Codegraph @

gcc/testsuite/gcc.target/mips/mips-minmax1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mhard-float -fno-finite-math-only -march=mips32r6" } */
3 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
4
5 /* Test MIN.D. */
6
7 /* { dg-final { scan-assembler "\tmin\\.d\t" } } */
8 double
9 test01 (double x, double y)
10 {
11 return __builtin_fmin (x, y);
12 }
13
14 /* Test MIN.S. */
15
16 /* { dg-final { scan-assembler "\tmin\\.s\t" } } */
17 float
18 test02 (float x, float y)
19 {
20 return __builtin_fminf (x, y);
21 }
22
23 /* Test MAX.D. */
24
25 /* { dg-final { scan-assembler "\tmax\\.d\t" } } */
26 double
27 test03 (double x, double y)
28 {
29 return __builtin_fmax (x, y);
30 }
31
32 /* Test MAX.S. */
33
34 /* { dg-final { scan-assembler "\tmax\\.s\t" } } */
35 float
36 test04 (float x, float y)
37 {
38 return __builtin_fmaxf (x, y);
39 }
40