1 /* { dg-require-effective-target vect_int } */
38 void foo (unsigned int *__restrict__ pInput
, unsigned int *__restrict__ pOutput
)
40 unsigned int i
, a
, b
, c
, d
, e
;
42 for (i
= 0; i
< N
/ 5; i
++)
50 *pOutput
++ = M00
* a
+ M01
* b
+ M02
* c
+ M03
* d
+ M04
* e
;
51 *pOutput
++ = M10
* a
+ M11
* b
+ M12
* c
+ M13
* d
+ M14
* e
;
52 *pOutput
++ = M20
* a
+ M21
* b
+ M22
* c
+ M23
* d
+ M24
* e
;
53 *pOutput
++ = M30
* a
+ M31
* b
+ M32
* c
+ M33
* d
+ M34
* e
;
54 *pOutput
++ = M40
* a
+ M41
* b
+ M42
* c
+ M43
* d
+ M44
* e
;
58 int main (int argc
, const char* argv
[])
60 unsigned int input
[N
], output
[N
], i
;
61 unsigned int check_results
[N
] = {3208, 1334, 28764, 35679, 2789, 13028, 4754, 168364, 91254, 12399, 22848, 8174, 307964, 146829, 22009, 0};
65 for (i
= 0; i
< N
; i
++)
71 __asm__
volatile ("");
76 for (i
= 0; i
< N
; i
++)
77 if (output
[i
] != check_results
[i
])
83 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
84 /* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 1 "vect" { target vect_perm } } } */
85 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */
86 /* { dg-final { cleanup-tree-dump "vect" } } */