]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/i386/vect-mulv8qi.c
i386: Add infrastructure for QImode partial vector mult and shift operations
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / i386 / vect-mulv8qi.c
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -ftree-vectorize -msse2" } */
3
4 #define N 8
5
6 unsigned char ur[N], ua[N], ub[N];
7
8 void mul (void)
9 {
10 int i;
11
12 for (i = 0; i < N; i++)
13 ur[i] = ua[i] * ub[i];
14 }
15
16 void mul_slp (void)
17 {
18 ur[0] = ua[0] * ub[0];
19 ur[1] = ua[1] * ub[1];
20 ur[2] = ua[2] * ub[2];
21 ur[3] = ua[3] * ub[3];
22 ur[4] = ua[4] * ub[4];
23 ur[5] = ua[5] * ub[5];
24 ur[6] = ua[6] * ub[6];
25 ur[7] = ua[7] * ub[7];
26 }
27
28 /* { dg-final { scan-assembler-times "pmullw" 2 } } */