1 /* { dg-do compile } */
2 /* { dg-additional-options "-Ofast -funroll-loops" } */
4 typedef unsigned char uchar
;
5 typedef struct rgb_
{uchar r
; uchar g
; uchar b
;} rgb
;
12 for (i
= 0; i
< n
; i
++) //in and out are RGB byte arrays
14 float r
= 0, g
= 0, b
= 0;
15 for (j
= 0; j
< 5; j
++)
17 r
+= (float)in
[i
+ j
].r
* c
[j
];
18 g
+= (float)in
[i
+ j
].g
* c
[j
];
19 b
+= (float)in
[i
+ j
].b
* c
[j
];
27 /* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { target { vect_float && vect_intfloat_cvt } } } } */