Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/extract_zero_extend.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-rtl-final" } */
3
4 /* Tests div16qi. */
5 typedef unsigned char div16qi __attribute__ ((vector_size (16)));
6 /* Tests div8qi. */
7 typedef unsigned char div8qi __attribute__ ((vector_size (8)));
8 /* Tests div8hi. */
9 typedef unsigned short div8hi __attribute__ ((vector_size (16)));
10 /* Tests div4hi. */
11 typedef unsigned short div4hi __attribute__ ((vector_size (8)));
12
13 /* Tests siv16qi. */
14 typedef unsigned char siv16qi __attribute__ ((vector_size (16)));
15 /* Tests siv8qi. */
16 typedef unsigned char siv8qi __attribute__ ((vector_size (8)));
17 /* Tests siv8hi. */
18 typedef unsigned short siv8hi __attribute__ ((vector_size (16)));
19 /* Tests siv4hi. */
20 typedef unsigned short siv4hi __attribute__ ((vector_size (8)));
21
22
23 unsigned long long
24 foo_div16qi (div16qi a)
25 {
26 return a[0];
27 }
28
29 unsigned long long
30 foo_div8qi (div8qi a)
31 {
32 return a[0];
33 }
34
35 unsigned long long
36 foo_div8hi (div8hi a)
37 {
38 return a[0];
39 }
40
41 unsigned long long
42 foo_div4hi (div4hi a)
43 {
44 return a[0];
45 }
46
47 unsigned int
48 foo_siv16qi (siv16qi a)
49 {
50 return a[0];
51 }
52
53 unsigned int
54 foo_siv8qi (siv8qi a)
55 {
56 return a[0];
57 }
58
59 unsigned int
60 foo_siv8hi (siv8hi a)
61 {
62 return a[0];
63 }
64
65 unsigned int
66 foo_siv4hi (siv4hi a)
67 {
68 return a[0];
69 }
70
71 /* { dg-final { scan-assembler-times "umov\\t" 8 } } */
72 /* { dg-final { scan-assembler-not "and\\t" } } */