1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
3 /* { dg-require-effective-target vect_usad_char } */
11 unsigned char X
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
12 unsigned char Y
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
15 /* Sum of absolute differences between arrays of unsigned char types.
16 Detected as a sad pattern.
17 Vectorized on targets that support sad for unsigned chars. */
19 __attribute__ ((noinline
)) int
25 for (i
= 0; i
< len
; i
++)
26 result
+= abs (X
[i
] - Y
[i
]);
40 for (i
= 0; i
< N
; i
++)
44 __asm__
volatile ("");
54 /* { dg-final { scan-tree-dump "vect_recog_sad_pattern: detected" "vect" } } */
55 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */