1 /* { dg-require-effective-target vect_int } */
10 signed char X[N] __attribute__ ((__aligned__(16)));
11 signed char Y[N] __attribute__ ((__aligned__(16)));
13 /* char->short->short dot product.
14 The dot-product pattern should be detected.
15 Should be vectorized on vect_sdot_qi targets (targets that support
16 dot-product of signed char).
17 This test currently fails to vectorize on targets that support
18 dot-product of chars into and int accumulator.
19 Can also be vectorized as widening-mult + summation,
20 or with type-conversion support.
27 for (i=0; i<len; i++) {
28 result += (X[i] * Y[i]);
52 /* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" } } */
53 /* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" } } */
55 /* When vectorizer is enhanced to vectorize accumulation into short for targets
56 that support accumulation into int (e.g. ia64) we'd have:
57 dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_sdot_qi } }
59 /* In the meantime expect: */
60 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_qi_to_hi } } } */
62 /* { dg-final { cleanup-tree-dump "vect" } } */