Debian Codegraph @

gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_scalar_shifts3.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_mve_hw } */
3 /* { dg-options "-O2" } */
4 /* { dg-add-options arm_v8_1m_mve } */
5
6 #include "arm_mve.h"
7 #include "stdio.h"
8 #include <stdlib.h>
9
10 void
11 foo (int32_t acc, uint32_t acc1, int shift)
12 {
13 acc = sqrshr (acc, shift);
14 if (acc != 16)
15 abort();
16 acc1 = uqrshl (acc1, shift);
17 if (acc1 != 128)
18 abort();
19 }
20
21 int main()
22 {
23 int32_t acc = 128;
24 uint32_t acc1 = 16;
25 int shift = 3;
26 foo (acc, acc1, shift);
27 return 0;
28 }