Debian Codegraph @

gcc/testsuite/g++.target/aarch64/mv-symbols1.C

raw
1 /* { dg-do compile } */
2 /* { dg-require-ifunc "" } */
3 /* { dg-options "-O0" } */
4 /* { dg-additional-options "-Wno-experimental-fmv-target" } */
5
6 int foo ()
7 {
8 return 1;
9 }
10
11 __attribute__((target_version("dotprod")))
12 int foo ()
13 {
14 return 3;
15 }
16 __attribute__((target_version("sve+sve2")))
17 int foo ()
18 {
19 return 5;
20 }
21
22 __attribute__((target_version("sve+sve2")))
23 int foo (int)
24 {
25 return 6;
26 }
27
28 __attribute__((target_version("dotprod")))
29 int foo (int)
30 {
31 return 4;
32 }
33
34 int foo (int)
35 {
36 return 2;
37 }
38
39
40 int bar()
41 {
42 return foo ();
43 }
44
45 int bar(int x)
46 {
47 return foo (x);
48 }
49
50 /* When updating any of the symbol names in these tests, make sure to also
51 update any tests for their absence in mv-symbolsN.C */
52
53 /* { dg-final { scan-assembler-times "\n_Z3foov\.default:\n" 1 } } */
54 /* { dg-final { scan-assembler-times "\n_Z3foov\._Mdotprod:\n" 1 } } */
55 /* { dg-final { scan-assembler-times "\n_Z3foov\._MsveMsve2:\n" 1 } } */
56 /* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
57 /* { dg-final { scan-assembler-times "\n\tbl\t_Z3foov\n" 1 } } */
58 /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, %gnu_indirect_function\n" 1 } } */
59 /* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
60
61 /* { dg-final { scan-assembler-times "\n_Z3fooi\.default:\n" 1 } } */
62 /* { dg-final { scan-assembler-times "\n_Z3fooi\._Mdotprod:\n" 1 } } */
63 /* { dg-final { scan-assembler-times "\n_Z3fooi\._MsveMsve2:\n" 1 } } */
64 /* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */
65 /* { dg-final { scan-assembler-times "\n\tbl\t_Z3fooi\n" 1 } } */
66 /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, %gnu_indirect_function\n" 1 } } */
67 /* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 1 } } */