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_int } */
12 signed char X
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
13 signed char Y
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
15 /* char->short->short dot product.
16 The dot-product pattern should be detected.
18 When the dot-product is detected, the loop should be vectorized on vect_sdot_qi
19 targets (targets that support dot-product of signed char).
20 This test would currently fail to vectorize on targets that support
21 dot-product of chars into an int accumulator.
22 Alternatively, the loop could also be vectorized as widening-mult + summation,
23 or with type-conversion support.
25 __attribute__ ((noinline
)) short
30 for (i
=0; i
<len
; i
++) {
31 result
+= (X
[i
] * Y
[i
]);
46 __asm__
volatile ("");
56 /* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected(?:(?!Analysis failed).)*Analysis succeeded" 1 "vect" { xfail *-*-* } } } */
57 /* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected(?:(?!Analysis failed).)*Analysis succeeded" 1 "vect" { target vect_widen_mult_qi_to_hi } } } */
59 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_qi_to_hi } } } */