Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-multitypes-11.c
blobef66c734e9cac3b63cb7c4e071d87764c68ed171
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)));
10 __attribute__ ((noinline)) int
11 foo (int len, int *z) {
12 int i;
14 for (i=0; i<len; i++) {
15 z[i] = x[i];
20 int main (void)
22 short i;
23 int z[N+4];
25 check_vect ();
27 for (i=0; i<N; i++) {
28 x[i] = i;
31 foo (N,z+2);
33 for (i=0; i<N; i++) {
34 if (z[i+2] != x[i])
35 abort ();
38 return 0;
41 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
42 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_unpack } } } } */
43 /* { dg-final { cleanup-tree-dump "vect" } } */