Debian Codegraph @

gcc/testsuite/gcc.target/arm/mve/intrinsics/vadcq-check-carry.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_v8_1m_mve_ok } */
3 /* { dg-require-effective-target arm_mve_hw } */
4 /* { dg-options "-O2" } */
5 /* { dg-add-options arm_v8_1m_mve } */
6
7 #include "arm_mve.h"
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 #include <inttypes.h>
14 #include <stdio.h>
15
16 __attribute((noinline)) void print_uint32x4_t(const char *name, uint32x4_t val)
17 {
18 printf("%s: %u, %u, %u, %u\n",
19 name,
20 vgetq_lane_u32(val, 0),
21 vgetq_lane_u32(val, 1),
22 vgetq_lane_u32(val, 2),
23 vgetq_lane_u32(val, 3));
24 }
25
26 void __attribute__ ((noinline)) test_2(void)
27 {
28 uint32x4_t v12, v18, v108;
29 unsigned v17 = 0;
30 v12 = vdupq_n_u32(1);
31 v18 = vadcq_u32(v12, v12, &v17);
32 v17 = 1;
33 v108 = vadcq_u32(v12, v12, &v17);
34 print_uint32x4_t("v108", v108);
35 }
36
37 int main()
38 {
39 test_2();
40 return 0;
41 }
42
43 #ifdef __cplusplus
44 }
45 #endif
46
47 /* { dg-output "v108: 3, 2, 2, 2" } */
48 /* { dg-final { scan-assembler-times {\tvmrs\t(?:ip|fp|r[0-9]+), FPSCR_nzcvqc} 3 } } */