1 /* { dg-require-effective-target vect_int } */
9 signed short X
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
10 signed short Y
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
)));
12 /* short->int->int dot product.
13 Detected as a dot-product pattern.
14 Vectorized on targets that support dot-product for signed shorts. */
16 __attribute__ ((noinline
)) int
22 for (i
= 0; i
< len
; i
++)
24 result
+= (X
[i
] * Y
[i
]);
38 for (i
= 0; i
< N
; i
++)
42 __asm__
volatile ("");
52 /* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" } } */
53 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_sdot_hi } } } */
54 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_hi_to_si } } } */
55 /* { dg-final { cleanup-tree-dump "vect" } } */