1 /* { dg-do compile } */
2 /* { dg-options "-ftree-vectorize" } */
11 void fn(unsigned char * __restrict dst
, const unsigned char * __restrict src
)
14 for(x
= 0; x
< 1024; x
+= 1)
17 pixel
.r
= (unsigned short)(((unsigned)src
[0]) * 0xffff / 0xff);
18 pixel
.g
= (unsigned short)(((unsigned)src
[1]) * 0xffff / 0xff);
19 pixel
.b
= (unsigned short)(((unsigned)src
[2]) * 0xffff / 0xff);
20 pixel
.a
= (unsigned short)(((unsigned)src
[3]) * 0xffff / 0xff);
21 __builtin_memcpy(dst
, &pixel
, sizeof pixel
);