Debian Codegraph @

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

raw
1 /* Test intrinsics for frecipe.{s/d} and frsqrte.{s/d} instructions */
2 /* { dg-do compile } */
3 /* { dg-options "-mfrecipe -O2" } */
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 #include <larchintrin.h>
10
11 float
12 test_frecipe_s (float _1)
13 {
14 return __frecipe_s (_1);
15 }
16 double
17 test_frecipe_d (double _1)
18 {
19 return __frecipe_d (_1);
20 }
21 float
22 test_frsqrte_s (float _1)
23 {
24 return __frsqrte_s (_1);
25 }
26 double
27 test_frsqrte_d (double _1)
28 {
29 return __frsqrte_d (_1);
30 }