blob: e111574c473a1a739610677c9591aeecca8ea87b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* PR target/50038 */
/* { dg-options "-O2" } */
void
test (int len, unsigned char *in, unsigned char *out)
{
int i;
unsigned char xr, xg;
unsigned char xy=0;
for (i = 0; i < len; i++)
{
xr = *in++;
xg = *in++;
xy = (unsigned char) ((19595 * xr + 38470 * xg) >> 16);
*out++ = xy;
}
}
/* { dg-final { scan-assembler-times "movzbl" 2 } } */
|