1 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
2 /* { dg-do compile } */
4 /* Copied from PR 88915. */
5 void pixel_avg( unsigned char *dst
, int i_dst_stride
,
6 unsigned char *src1
, int i_src1_stride
,
7 unsigned char *src2
, int i_src2_stride
,
8 int i_width
, int i_height
)
10 for( int y
= 0; y
< i_height
; y
++ )
12 for( int x
= 0; x
< i_width
; x
++ )
13 dst
[x
] = ( src1
[x
] + src2
[x
] + 1 ) >> 1;
15 src1
+= i_src1_stride
;
16 src2
+= i_src2_stride
;
20 /* { dg-final { scan-tree-dump "LOOP EPILOGUE VECTORIZED" "vect" { target vect_multiple_sizes xfail { { arm32 && be } || vect_partial_vectors_usage_2 } } } } */
21 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */