1 /* { dg-require-effective-target vect_int } */
25 void foo (unsigned int *__restrict__ pInput, unsigned int *__restrict__ pOutput)
27 unsigned int i, a, b, c, d;
29 for (i = 0; i < N / 4; i++)
36 *pOutput++ = M00 * a + M01 * b + M02 * c + M03 * d;
37 *pOutput++ = M10 * a + M11 * b + M12 * c + M13 * d;
38 *pOutput++ = M20 * a + M21 * b + M22 * c + M23 * d;
39 *pOutput++ = M30 * a + M31 * b + M32 * c + M33 * d;
43 int main (int argc, const char* argv[])
45 unsigned int input[N], output[N], i;
46 unsigned int check_results[N] = {1872, 746, 28304, 4815, 8392, 2894, 139524, 18411, 14912, 5042, 250744, 32007, 21432, 7190, 361964, 45603};
50 for (i = 0; i < N; i++)
54 __asm__ volatile ("");
59 for (i = 0; i < N; i++)
61 if (output[i] != check_results[i])
63 __asm__ volatile ("");
69 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */
70 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_perm } } } */
71 /* { dg-final { cleanup-tree-dump "vect" } } */