Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/cnt_fold_2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 #include <arm_sve.h>
5
6 int
7 f1 (int x)
8 {
9 x /= 2;
10 return x * svcntw();
11 }
12
13 int
14 f2 (int x)
15 {
16 x /= 4;
17 return x * svcnth();
18 }
19
20 int
21 f3 (int x)
22 {
23 x /= 8;
24 return x * svcntb();
25 }
26
27 int
28 f4 (int x)
29 {
30 x /= 2;
31 return x * svcnth();
32 }
33
34 int
35 f5 (int x)
36 {
37 x /= 4;
38 return x * svcntb();
39 }
40
41 int
42 f6 (int x)
43 {
44 x /= 2;
45 return x * svcntb();
46 }
47
48 int
49 f7 (int x)
50 {
51 x /= 16;
52 return x * svcntb() * 16;
53 }
54
55 /* { dg-final { scan-assembler-times {\tasr\t} 7 } } */