1 /* { dg-require-effective-target power10_ok } */
2 /* Vector with length instructions lxvl/stxvl are only enabled for 64 bit. */
3 /* { dg-require-effective-target lp64 } */
4 /* { dg-options "-mdejagnu-cpu=power10 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
5
6 /* Power10 support partial vector for epilogue by default, it's expected
7 vectorizer would re-try for it once. */
8
9 #include <stdarg.h>
10 #define N 200
11
12 void __attribute__((noinline))
13 foo (unsigned short *__restrict__ pInput, unsigned short *__restrict__ pOutput)
14 {
15 unsigned short i, a, b, c;
16
17 for (i = 0; i < N / 3; i++)
18 {
19 a = *pInput++;
20 b = *pInput++;
21 c = *pInput++;
22
23 *pOutput++ = a + b + c + 3;
24 *pOutput++ = a + b + c + 12;
25 *pOutput++ = a + b + c + 1;
26 }
27 }
28
29 /* { dg-final { scan-tree-dump-times "Re-trying epilogue analysis with vector mode" 1 "vect" } } */