view gcc/testsuite/gcc.dg/vect/O3-pr36098.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +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 } } } } */