1 /* { dg-do compile } */
2 /* { dg-options "-O3" } */
3 
4 #pragma GCC target "+nosve"
5 
6 int
t6(int len,void * dummy,short * __restrict x)7 t6(int len, void * dummy, short * __restrict x)
8 {
9   len = len & ~31;
10   int result = 0;
11   __asm volatile ("");
12   for (int i = 0; i < len; i++)
13     result += x[i];
14   return result;
15 }
16 
17 /* { dg-final { scan-assembler "saddw" } } */
18 /* { dg-final { scan-assembler "saddw2" } } */
19