1 /* { dg-do compile } */
2 /* { dg-options "-O3 -march=armv8.2-a+i8mm+sve" } */
3 
4 #define N 480
5 #define SIGNEDNESS_1 unsigned
6 #define SIGNEDNESS_2 signed
7 #define SIGNEDNESS_3 signed
8 #define SIGNEDNESS_4 unsigned
9 
10 SIGNEDNESS_1 int __attribute__ ((noipa))
f(SIGNEDNESS_1 int res,SIGNEDNESS_3 char * restrict a,SIGNEDNESS_4 char * restrict b)11 f (SIGNEDNESS_1 int res, SIGNEDNESS_3 char *restrict a,
12    SIGNEDNESS_4 char *restrict b)
13 {
14   for (__INTPTR_TYPE__ i = 0; i < N; ++i)
15     {
16       int av = a[i];
17       int bv = b[i];
18       SIGNEDNESS_2 short mult = av * bv;
19       res += mult;
20     }
21   return res;
22 }
23 
24 SIGNEDNESS_1 int __attribute__ ((noipa))
g(SIGNEDNESS_1 int res,SIGNEDNESS_3 char * restrict b,SIGNEDNESS_4 char * restrict a)25 g (SIGNEDNESS_1 int res, SIGNEDNESS_3 char *restrict b,
26    SIGNEDNESS_4 char *restrict a)
27 {
28   for (__INTPTR_TYPE__ i = 0; i < N; ++i)
29     {
30       int av = a[i];
31       int bv = b[i];
32       SIGNEDNESS_2 short mult = av * bv;
33       res += mult;
34     }
35   return res;
36 }
37 
38 /* { dg-final { scan-assembler-times {\tusdot\t} 2 } } */
39