annotate gcc/testsuite/gcc.target/arm/acle/cde-mve-error-3.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
152
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 #include "arm_cde.h"
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3 /* { dg-do assemble } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 /* { dg-require-effective-target arm_v8_1m_main_cde_mve_fp_ok } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 /* { dg-add-options arm_v8_1m_main_cde_mve_fp } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 uint32_t test (int8x16_t m, int8x16_t n, mve_pred16_t pred)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 /* Bad types for polymophic arguments. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 uint32_t accum = 0, n_int = 0, m_int = 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 accum += __arm_vcx1qa (0, accum, 4095);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 accum += __arm_vcx2q (0, n_int, 126);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 accum += __arm_vcx2q_u8 (0, n_int, 127);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 accum += __arm_vcx2qa (0, accum, n_int, 127);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 accum += __arm_vcx3q_u8 (0, n_int, m_int, 14);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 accum += __arm_vcx3q (0, n_int, m_int, 15);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 accum += __arm_vcx3qa (0, accum, n_int, m_int, 15);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 /* We get a at least two errors for each function since the errors are
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 checked for validity in two different ways and both are caught.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 The resolver manually checks that each type is 128 bits wide, and only
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22 casts the value if that's true.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 After the resolver rejects the function call then the C frontend tries to
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 fit the original call to the builtin. This produces a second set of
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 error messages from the C frontend argument checking. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 /* { dg-error {argument 2 to function '__builtin_arm_vcx1qav16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 11 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx1qav16qi'} "" { target *-*-* } 11 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
29
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
30 /* { dg-error {argument 2 to function '__builtin_arm_vcx2qv16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 12 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
31 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx2qv16qi'} "" { target *-*-* } 12 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
32
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
33 /* { dg-error {argument 2 to function '__builtin_arm_vcx2qv16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 13 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
34 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx2qv16qi'} "" { target *-*-* } 13 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
35
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
36 /* { dg-error {argument 2 to function '__builtin_arm_vcx2qav16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 14 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
37 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx2qav16qi'} "" { target *-*-* } 14 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
38 /* { dg-error {argument 3 to function '__builtin_arm_vcx2qav16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 14 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
39 /* { dg-error {incompatible type for argument 3 of '__builtin_arm_vcx2qav16qi'} "" { target *-*-* } 14 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
40
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
41 /* { dg-error {argument 2 to function '__builtin_arm_vcx3qv16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 15 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
42 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx3qv16qi'} "" { target *-*-* } 15 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
43 /* { dg-error {argument 3 to function '__builtin_arm_vcx3qv16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 15 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
44 /* { dg-error {incompatible type for argument 3 of '__builtin_arm_vcx3qv16qi'} "" { target *-*-* } 15 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
45
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
46 /* { dg-error {argument 2 to function '__builtin_arm_vcx3qv16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 16 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
47 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx3qv16qi'} "" { target *-*-* } 16 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
48 /* { dg-error {argument 3 to function '__builtin_arm_vcx3qv16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 16 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
49 /* { dg-error {incompatible type for argument 3 of '__builtin_arm_vcx3qv16qi'} "" { target *-*-* } 16 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
50
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
51 /* { dg-error {argument 2 to function '__builtin_arm_vcx3qav16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 17 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
52 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx3qav16qi'} "" { target *-*-* } 17 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
53 /* { dg-error {argument 3 to function '__builtin_arm_vcx3qav16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 17 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
54 /* { dg-error {incompatible type for argument 3 of '__builtin_arm_vcx3qav16qi'} "" { target *-*-* } 17 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
55 /* { dg-error {argument 4 to function '__builtin_arm_vcx3qav16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 17 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
56 /* { dg-error {incompatible type for argument 4 of '__builtin_arm_vcx3qav16qi'} "" { target *-*-* } 17 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
57
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
58 accum += __arm_vcx1qa_m (0, accum, 4095, pred);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
59 accum += __arm_vcx2q_m (0, accum, n_int, 126, pred);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
60 accum += __arm_vcx2qa_m (0, accum, n_int, 127, pred);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
61 accum += __arm_vcx3q_m (0, accum, n_int, m_int, 15, pred);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
62 accum += __arm_vcx3qa_m (0, accum, n_int, m_int, 15, pred);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
63
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
64 /* { dg-error {argument 2 to function '__builtin_arm_vcx1qa_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 58 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
65 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx1qa_p_v16qi'} "" { target *-*-* } 58 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
66
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
67 /* { dg-error {argument 2 to function '__builtin_arm_vcx2q_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 59 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
68 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx2q_p_v16qi'} "" { target *-*-* } 59 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
69 /* { dg-error {argument 3 to function '__builtin_arm_vcx2q_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 59 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
70 /* { dg-error {incompatible type for argument 3 of '__builtin_arm_vcx2q_p_v16qi'} "" { target *-*-* } 59 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
71
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
72 /* { dg-error {argument 2 to function '__builtin_arm_vcx2qa_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 60 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
73 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx2qa_p_v16qi'} "" { target *-*-* } 60 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
74 /* { dg-error {argument 3 to function '__builtin_arm_vcx2qa_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 60 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
75 /* { dg-error {incompatible type for argument 3 of '__builtin_arm_vcx2qa_p_v16qi'} "" { target *-*-* } 60 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
76
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
77 /* { dg-error {argument 2 to function '__builtin_arm_vcx3q_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 61 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
78 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx3q_p_v16qi'} "" { target *-*-* } 61 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
79 /* { dg-error {argument 3 to function '__builtin_arm_vcx3q_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 61 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
80 /* { dg-error {incompatible type for argument 3 of '__builtin_arm_vcx3q_p_v16qi'} "" { target *-*-* } 61 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
81 /* { dg-error {argument 4 to function '__builtin_arm_vcx3q_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 61 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
82 /* { dg-error {incompatible type for argument 4 of '__builtin_arm_vcx3q_p_v16qi'} "" { target *-*-* } 61 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
83
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
84 /* { dg-error {argument 2 to function '__builtin_arm_vcx3qa_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 62 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
85 /* { dg-error {incompatible type for argument 2 of '__builtin_arm_vcx3qa_p_v16qi'} "" { target *-*-* } 62 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
86 /* { dg-error {argument 3 to function '__builtin_arm_vcx3qa_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 62 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
87 /* { dg-error {incompatible type for argument 3 of '__builtin_arm_vcx3qa_p_v16qi'} "" { target *-*-* } 62 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
88 /* { dg-error {argument 4 to function '__builtin_arm_vcx3qa_p_v16qi' is of type 'uint32_t' {aka '(?:long )?unsigned int'} which is not known to be 128 bits wide} "" { target *-*-* } 62 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
89 /* { dg-error {incompatible type for argument 4 of '__builtin_arm_vcx3qa_p_v16qi'} "" { target *-*-* } 62 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
90
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
91 return accum;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
92 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
93
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
94 /* Testing that undeclared variables work as expected.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
95 (This to verify we fixed a problem hit during development). */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
96 int8x16_t test3 (int8x16_t m, int8x16_t n)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
97 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
98 int8x16_t accum = (int8x16_t)(uint64x2_t) { 0, 0 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
99 accum += __arm_vcx1qa (0, accum_int, 4095);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
100 accum += __arm_vcx2q (0, n_int, 126);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
101 accum += __arm_vcx2q_u8 (0, n_int, 127);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
102 accum += __arm_vcx2qa (0, accum, n_int, 127);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
103 accum += __arm_vcx3q_u8 (0, n_int, m, 14);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
104 accum += __arm_vcx3q_u8 (0, n, m_int, 14);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
105 accum += __arm_vcx3q (0, n_int, m, 15);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
106 accum += __arm_vcx3q (0, n, m_int, 15);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
107 accum += __arm_vcx3qa (0, accum, n_int, m, 15);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
108 accum += __arm_vcx3qa (0, accum, n_int, m_int, 15);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
109
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
110 /* { dg-error {'accum_int' undeclared \(first use in this function\)} "" { target *-*-* } 99 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
111 /* { dg-error {'n_int' undeclared \(first use in this function\)} "" { target *-*-* } 100 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
112 /* { dg-error {'m_int' undeclared \(first use in this function\)} "" { target *-*-* } 104 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
113 return accum;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
114 }