1 /* { dg-require-effective-target vect_int } */
2 /* { dg-require-effective-target vect_shift } */
9 /* Modified rgb to rgb conversion from FFmpeg. */
10 __attribute__ ((noinline
)) int
11 foo (unsigned char *src
, unsigned char *dst
)
13 unsigned char *s
= src
;
14 unsigned short *d
= (unsigned short *)dst
, res
;
17 for (i
= 0; i
< N
/4; i
++)
23 res
= ((b
>>3) | ((g
&0xFC)<<3) | ((r
&0xF8)<<8) | (a
>>5));
30 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 {vect_recog_over_widening_pattern: detected:[^\n]* >> 3} "vect" } } */
67 /* { dg-final { scan-tree-dump {vect_recog_over_widening_pattern: detected:[^\n]* >> 5} "vect" } } */
68 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */