1 /* { dg-require-effective-target vect_int } */
2 /* { dg-require-effective-target vect_shift } */
8 #define N (VECTOR_BITS * 8 / 16)
13 /* Modified rgb to rgb conversion from FFmpeg. */
14 __attribute__ ((noinline
)) int
15 foo (unsigned char *src
, unsigned char *dst
)
17 unsigned char *s
= src
;
18 unsigned short *d
= (unsigned short *)dst
, res
;
21 for (i
= 0; i
< N
/4; i
++)
27 res
= ((b
>>3) | ((g
&0xFC)<<3) | ((r
&0xF8)<<8) | (a
>>5));
34 d
= (unsigned short *)dst
;
36 for (i
= 0; i
< N
/4; i
++)
42 if (*d
!= ((b
>>3) | ((g
&0xFC)<<3) | ((r
&0xF8)<<8) | (a
>>5)))
53 unsigned char in
[N
], out
[N
];
57 for (i
= 0; i
< N
; i
++)
61 __asm__
volatile ("");
69 /* { dg-final { scan-tree-dump-times "vect_recog_widen_shift_pattern: detected" 2 "vect" { target vect_widen_shift } } } */
70 /* { dg-final { scan-tree-dump {vect_recog_over_widening_pattern: detected:[^\n]* >> 3} "vect" } } */
71 /* { dg-final { scan-tree-dump {vect_recog_over_widening_pattern: detected:[^\n]* >> 5} "vect" } } */
72 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */