view gcc/testsuite/gcc.dg/vect/bb-slp-34.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-require-effective-target vect_int } */

#include "tree-vect.h"

extern void abort (void);

int a[8], b[8];

void __attribute__((noinline,noclone))
foo(void)
{
  a[0] = b[3];
  a[1] = b[2];
  a[2] = b[1];
  a[3] = b[0];
  a[4] = b[2];
  a[5] = b[3];
  a[6] = b[4];
  a[7] = b[5];
}

int main()
{
  int i;
  check_vect ();
  for (i = 0; i < 8; ++i)
    b[i] = i;
  foo ();
  if (a[0] != 3 || a[1] != 2 || a[2] != 1 || a[3] != 0
      || a[4] != 2 || a[5] != 3 || a[6] != 4 || a[7] != 5)
    abort ();
  return 0;
}

/* ??? XFAILed because we access "excess" elements with the permutation.  */
/* { dg-final { scan-tree-dump "basic block vectorized" "slp2" { target vect_perm xfail { ! { aarch64*-*-* arm*-*-* } } } } } */