1 /* { dg-require-effective-target vect_int } */
18 void foo (unsigned int *__restrict__ pInput, unsigned int *__restrict__ pOutput)
20 unsigned int i, a, b, c;
22 for (i = 0; i < N / 3; i++)
28 *pOutput++ = M00 * a + M01 * b + M02 * c;
29 *pOutput++ = M10 * a + M11 * b + M12 * c;
30 *pOutput++ = M20 * a + M21 * b + M22 * c;
34 int main (int argc, const char* argv[])
36 unsigned int input[N], output[N], i;
37 unsigned int check_results[N] = {1470, 395, 28271, 5958, 1655, 111653, 10446, 2915, 195035, 14934, 4175, 278417, 19422, 5435, 361799, 0};
41 for (i = 0; i < N; i++)
45 __asm__ volatile ("");
50 for (i = 0; i < N; i++)
52 if (output[i] != check_results[i])
54 __asm__ volatile ("");
60 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */
61 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_perm } } } */
62 /* { dg-final { cleanup-tree-dump "vect" } } */