Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/fclass-compile.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -march=loongarch64 -mfpu=64 -mabi=lp64d" } */
3 /* { dg-final { scan-assembler-times "fclass\\.s" 1 } } */
4 /* { dg-final { scan-assembler-times "fclass\\.d" 1 } } */
5
6 __attribute__ ((noipa)) int
7 test_fclass_f (float f)
8 {
9 return __builtin_isinf (f)
10 | __builtin_isnormal (f) << 1
11 | __builtin_isfinite (f) << 2;
12 }
13
14 __attribute__ ((noipa)) int
15 test_fclass_d (double d)
16 {
17 return __builtin_isinf (d)
18 | __builtin_isnormal (d) << 1
19 | __builtin_isfinite (d) << 2;
20 }