From: Richard Biener Date: Wed, 21 Sep 2016 07:37:18 +0000 (+0000) Subject: re PR tree-optimization/77621 (Internal compiler error for mtune=atom + msse2) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f955c4c4837a491a8e8c3962867f276a94125dde;p=gcc.git re PR tree-optimization/77621 (Internal compiler error for mtune=atom + msse2) 2016-09-21 Richard Biener Jakub Jelinek PR tree-optimization/77621 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Split group at non-vectorizable stmts. * gcc.dg/pr77621.c: New testcase. Co-Authored-By: Jakub Jelinek From-SVN: r240302 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index faa7fb2d8d1..35f6e3a2f32 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-09-21 Richard Biener + Jakub Jelinek + + PR tree-optimization/77621 + * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Split + group at non-vectorizable stmts. + 2016-09-21 Kugan Vivekanandarajah PR tree-optimization/72835 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c355f214233..04613e4a0a8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2016-09-21 Richard Biener + Jakub Jelinek + + PR tree-optimization/77621 + * gcc.dg/pr77621.c: New testcase. + 2016-09-21 Paul Thomas PR fortran/77657 diff --git a/gcc/testsuite/gcc.dg/pr77621.c b/gcc/testsuite/gcc.dg/pr77621.c new file mode 100644 index 00000000000..e2804522a49 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr77621.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O3" } */ +/* { dg-additional-options "-mtune=atom -msse2" { target i?86-*-* x86_64-*-* } } */ + +void +foo (double *x, int *y) +{ + int i; + for (i = 0; i < 8; i++) + x[i] -= y[i] * x[i + 1]; +} diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 03c4a66103e..7c5f1010b9c 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2711,10 +2711,17 @@ vect_analyze_data_ref_accesses (vec_info *vinfo) data_reference_p dra = datarefs_copy[i]; stmt_vec_info stmtinfo_a = vinfo_for_stmt (DR_STMT (dra)); stmt_vec_info lastinfo = NULL; + if (! STMT_VINFO_VECTORIZABLE (stmtinfo_a)) + { + ++i; + continue; + } for (i = i + 1; i < datarefs_copy.length (); ++i) { data_reference_p drb = datarefs_copy[i]; stmt_vec_info stmtinfo_b = vinfo_for_stmt (DR_STMT (drb)); + if (! STMT_VINFO_VECTORIZABLE (stmtinfo_b)) + break; /* ??? Imperfect sorting (non-compatible types, non-modulo accesses, same accesses) can lead to a group to be artificially