1 /* { dg-require-effective-target vect_int } */
11 unsigned short X
[N
] __attribute__ ((__aligned__(16)));
12 unsigned short Y
[N
] __attribute__ ((__aligned__(16)));
14 /* short->short->int dot product. Not vectorized. */
15 /* ??? Is vectorized on i386. */
19 unsigned int result
= 0;
22 for (i
=0; i
<len
; i
++) {
29 /* short->int->int dot product. Should be vectorized on ppc,
30 but for some reason currently the GIMPLE arguments are cast to int
31 instead of 'unsigned int'. */
32 /* ??? This is exactly correct. The multiplication promotes to int,
33 then is promoted to unsigned int for the addition. Which results
34 in an int->unsigned int cast, which since no bits are modified in
35 the cast should be trivially vectorizable. */
39 unsigned int result
= 0;
41 for (i
=0; i
<len
; i
++) {
42 result
+= (X
[i
] * Y
[i
]);
50 unsigned int dot1
, dot2
;
71 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
72 /* { dg-final { cleanup-tree-dump "vect" } } */