Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / vect / vect-widen-mult-s16.c
blob109674c9985bc092d191ff6441eb687daa893eeb
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 64
8 short X[N] __attribute__ ((__aligned__(16)));
9 short Y[N] __attribute__ ((__aligned__(16)));
10 int result[N];
12 /* short->int widening-mult */
13 int
14 foo1(int len) {
15 int i;
17 for (i=0; i<len; i++) {
18 result[i] = X[i] * Y[i];
22 int main (void)
24 int i;
26 check_vect ();
28 for (i=0; i<N; i++) {
29 X[i] = i;
30 Y[i] = 64-i;
33 foo1 (N);
35 for (i=0; i<N; i++) {
36 if (result[i] != X[i] * Y[i])
37 abort ();
40 return 0;
43 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target powerpc*-*-* } } } */
44 /* { dg-final { cleanup-tree-dump "vect" } } */