diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/bb-slp-36.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/bb-slp-36.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-36.c b/gcc/testsuite/gcc.dg/vect/bb-slp-36.c new file mode 100644 index 0000000..f424d12 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-36.c @@ -0,0 +1,35 @@ +/* { 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[0]; + a[1] = b[0]; + a[2] = b[3]; + a[3] = b[3]; + a[4] = b[4]; + a[5] = b[7]; + a[6] = b[4]; + a[7] = b[7]; +} + +int main() +{ + int i; + check_vect (); + for (i = 0; i < 8; ++i) + b[i] = i; + foo (); + if (a[0] != 0 || a[1] != 0 || a[2] != 3 || a[3] != 3 + || a[4] != 4 || a[5] != 7 || a[6] != 4 || a[7] != 7) + abort (); + return 0; +} + +/* { dg-final { scan-tree-dump "basic block vectorized" "slp2" { target vect_perm } } } */ |