1 /* { dg-require-effective-target vect_int } */
2 /* { dg-require-effective-target vect_shift } */
10 /* Modified rgb to rgb conversion from FFmpeg. */
11 __attribute__ ((noinline
)) int
12 foo (unsigned char *src
, unsigned char *dst
)
14 unsigned char *s
= src
;
15 unsigned short *d
= (unsigned short *)dst
, res
;
18 for (i
= 0; i
< N
/4; i
++)
24 res
= ((b
>>3) | ((g
&0xFC)<<3) | ((r
&0xF8)<<8) | (a
>>5));
31 d
= (unsigned short *)dst
;
32 for (i
= 0; i
< N
/4; i
++)
38 if (*d
!= ((b
>>3) | ((g
&0xFC)<<3) | ((r
&0xF8)<<8) | (a
>>5)))
49 unsigned char in
[N
], out
[N
];
53 for (i
= 0; i
< N
; i
++)
57 __asm__
volatile ("");
65 /* { dg-final { scan-tree-dump-times "vect_recog_widen_shift_pattern: detected" 2 "vect" { target vect_widen_shift } } } */
66 /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 2 "vect" { target vect_widen_shift } } } */
67 /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 4 "vect" { target { { ! vect_sizes_32B_16B } && { ! vect_widen_shift } } } } } */
68 /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 8 "vect" { target vect_sizes_32B_16B } } } */
69 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
70 /* { dg-final { cleanup-tree-dump "vect" } } */