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
)) void
12 foo (unsigned char *src
, unsigned char *dst
)
14 unsigned char *s
= src
;
15 unsigned short *d
= (unsigned short *)dst
;
18 for (i
= 0; i
< N
/4; i
++)
24 *d
= ((b
>>3) | ((g
&0xFFC)<<3) | ((r
+0xF8)>>8) | (a
<<9));
29 d
= (unsigned short *)dst
;
30 for (i
= 0; i
< N
/4; i
++)
36 if (*d
!= ((b
>>3) | ((g
&0xFFC)<<3) | ((r
+0xF8)>>8) | (a
<<9)))
45 unsigned char in
[N
], out
[N
];
49 for (i
= 0; i
< N
; i
++)
53 __asm__
volatile ("");
61 /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 1 "vect" } } */
62 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
63 /* { dg-final { cleanup-tree-dump "vect" } } */