/* { dg-require-effective-target vect_int } */ #include #include "tree-vect.h" #define N 64 #define DOT 43680 unsigned char X[N] __attribute__ ((__aligned__(16))); unsigned char Y[N] __attribute__ ((__aligned__(16))); /* char->short->int dot product. Detected as a dot-product pattern. Should be vectorized on targets that support dot-product for unsigned chars (vect_udot_qi), and on targets that support widening-multiplication and widening-summation (vect_widen_mult_qi && vec_widen_sum_qi_to_si). Widening-multiplication can also be supported by type promotion and non-widening multiplication (vect_unpack && vect_short_mult); Widening summation can also be supported by type promotion and non-widening summation (vect_unpack). */ __attribute__ ((noinline)) unsigned int foo (int len) { int i; unsigned int result = 0; unsigned short prod; for (i=0; i