From 5b5826c4806c979ba796604a2211ead1f27bd669 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 9 Jun 2015 08:22:20 +0000 Subject: [PATCH] re PR tree-optimization/66419 (FAIL: gcc.target/aarch64/aapcs64/va_arg-6.c execution, -O3 -g) 2015-06-09 Richard Biener PR tree-optimization/66419 * tree-vect-slp.c (vect_supported_load_permutation_p): Properly consider GROUP_GAP when detecting a perfect subchain. * gcc.dg/vect/bb-slp-37.c: New testcase. From-SVN: r224271 --- gcc/ChangeLog | 6 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/vect/bb-slp-37.c | 32 +++++++++++++++++++++++++++ gcc/tree-vect-slp.c | 4 +++- 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/vect/bb-slp-37.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4cb644628cc..c4897caab10 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-06-09 Richard Biener + + PR tree-optimization/66419 + * tree-vect-slp.c (vect_supported_load_permutation_p): Properly + consider GROUP_GAP when detecting a perfect subchain. + 2015-06-09 Nick Clifton * config/rl78/rl78.c (rl78_select_section): When -mes0 is active diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a51682a3801..80fba49c3de 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-06-09 Richard Biener + + PR tree-optimization/66419 + * gcc.dg/vect/bb-slp-37.c: New testcase. + 2015-06-09 Shiva Chen * gcc.target/arm/stl-cond.c: New test. diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-37.c b/gcc/testsuite/gcc.dg/vect/bb-slp-37.c new file mode 100644 index 00000000000..dbbba87985b --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-37.c @@ -0,0 +1,32 @@ +/* { dg-require-effective-target vect_int } */ + +#include "tree-vect.h" + +extern void abort (void); + +int a[16]; +int b[4]; + +void __attribute__((noinline)) +foo (void) +{ + b[0] = a[0]; + b[1] = a[4]; + b[2] = a[8]; + b[3] = a[12]; +} + +int main() +{ + int i; + check_vect (); + for (i = 0; i < 16; ++i) + { + a[i] = i; + __asm__ volatile (""); + } + foo (); + if (b[0] != 0 || b[1] != 4 || b[2] != 8 || b[3] != 12) + abort (); + return 0; +} diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 9d8211e0833..660c8b27519 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1439,7 +1439,9 @@ vect_supported_load_permutation_p (slp_instance slp_instn) next_load = NULL; FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), j, load) { - if (j != 0 && next_load != load) + if (j != 0 + && (next_load != load + || GROUP_GAP (vinfo_for_stmt (load)) != 1)) { subchain_p = false; break; -- 2.30.2