1 /* { dg-require-effective-target vect_int } */
10 signed char X
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
11 signed char Y
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
13 /* char->short->short dot product.
14 The dot-product pattern should be detected.
15 The reduction is currently not vectorized becaus of the signed->unsigned->signed
16 casts, since this patch:
18 2005-12-26 Kazu Hirata <kazu@codesourcery.com>
20 PR tree-optimization/25125
22 When the dot-product is detected, the loop should be vectorized on vect_sdot_qi
23 targets (targets that support dot-product of signed char).
24 This test would currently fail to vectorize on targets that support
25 dot-product of chars into an int accumulator.
26 Alternatively, the loop could also be vectorized as widening-mult + summation,
27 or with type-conversion support.
29 __attribute__ ((noinline
)) short
34 for (i
=0; i
<len
; i
++) {
35 result
+= (X
[i
] * Y
[i
]);
50 __asm__
volatile ("");
60 /* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" { xfail *-*-* } } } */
61 /* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" } } */
63 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
65 /* { dg-final { cleanup-tree-dump "vect" } } */