Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/larch-frecipe-builtin.c

raw
1 /* Test builtins for frecipe.{s/d} and frsqrte.{s/d} instructions */
2 /* { dg-do compile } */
3 /* { dg-options "-mfrecipe" } */
4 /* { dg-final { scan-assembler-times "test_frecipe_s:.*frecipe\\.s.*test_frecipe_s" 1 } } */
5 /* { dg-final { scan-assembler-times "test_frecipe_d:.*frecipe\\.d.*test_frecipe_d" 1 } } */
6 /* { dg-final { scan-assembler-times "test_frsqrte_s:.*frsqrte\\.s.*test_frsqrte_s" 1 } } */
7 /* { dg-final { scan-assembler-times "test_frsqrte_d:.*frsqrte\\.d.*test_frsqrte_d" 1 } } */
8
9 float
10 test_frecipe_s (float _1)
11 {
12 return __builtin_loongarch_frecipe_s (_1);
13 }
14 double
15 test_frecipe_d (double _1)
16 {
17 return __builtin_loongarch_frecipe_d (_1);
18 }
19 float
20 test_frsqrte_s (float _1)
21 {
22 return __builtin_loongarch_frsqrte_s (_1);
23 }
24 double
25 test_frsqrte_d (double _1)
26 {
27 return __builtin_loongarch_frsqrte_d (_1);
28 }