view gcc/testsuite/gcc.dg/vect/O3-pr36098.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */

typedef struct {
  int iatom[3];
  int blocknr;
} t_sortblock;

#define DIM 3

void foo (int ncons, t_sortblock *sb, int *iatom)
{
 int i, m;

 for(i=0; (i<ncons); i++,iatom+=3)
   for(m=0; (m<DIM); m++)
     iatom[m]=sb[i].iatom[m];
}

/* The testcase was originally added for correctness reasons but now we
   can vectorize it correctly if the target supports the permutations
   required.  */

/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { ! vect_perm } } } } */