diff options
author | Richard Biener <rguenther@suse.de> | 2016-01-15 11:49:43 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-01-15 11:49:43 +0000 |
commit | 89483f9984c057366bca7f24920fa91637f1efdb (patch) | |
tree | c43194c1663e6cd9382734668ba65f849539ab3b | |
parent | 94619ed95ba0a31df9f9ec6532e6c8f4bcdbefaf (diff) | |
download | gcc-89483f9984c057366bca7f24920fa91637f1efdb.zip gcc-89483f9984c057366bca7f24920fa91637f1efdb.tar.gz gcc-89483f9984c057366bca7f24920fa91637f1efdb.tar.bz2 |
re PR tree-optimization/68961 (Test case gcc.target/powerpc/pr60203.c fails since r231674)
2016-01-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/68961
* tree-vect-slp.c (vect_analyze_slp_cost_1): Consider cost
of invariants in stores again.
* gcc.dg/vect/costmodel/x86_64/costmodel-pr68961.c: New testcase.
From-SVN: r232415
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-pr68961.c | 15 | ||||
-rw-r--r-- | gcc/tree-vect-slp.c | 16 |
4 files changed, 35 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e0da444..500ba65 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-01-15 Richard Biener <rguenther@suse.de> + + PR tree-optimization/68961 + * tree-vect-slp.c (vect_analyze_slp_cost_1): Consider cost + of invariants in stores again. + 2016-01-15 Sebastian Huber <sebastian.huber@embedded-brains.de> * config/arm/t-rtems: Add cortex-m7/fpv5-d16 multilib. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 456edf2..f8d58ce 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-01-15 Richard Biener <rguenther@suse.de> + + PR tree-optimization/68961 + * gcc.dg/vect/costmodel/x86_64/costmodel-pr68961.c: New testcase. + 2016-01-15 Ilya Enkovich <enkovich.gnu@gmail.com> * gcc.target/i386/pr65105-5.c: New test. diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-pr68961.c b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-pr68961.c new file mode 100644 index 0000000..a88b148 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-pr68961.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-fdump-tree-slp-details" } */ + +struct x { double d[2]; }; + +struct x +pack (double a, double aa) +{ + struct x u; + u.d[0] = a; + u.d[1] = aa; + return u; +} + +/* { dg-final { scan-tree-dump-times "vectorization is not profitable" 1 "slp2" } } */ diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 161655a..fe422f8 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1453,18 +1453,20 @@ vect_analyze_slp_cost_1 (slp_instance instance, slp_tree node, /* Record the cost for the vector loads. */ vect_model_load_cost (stmt_info, ncopies_for_cost, false, node, prologue_cost_vec, body_cost_vec); + return; } - return; } - - record_stmt_cost (body_cost_vec, ncopies_for_cost, vector_stmt, - stmt_info, 0, vect_body); - if (SLP_TREE_TWO_OPERATORS (node)) + else { record_stmt_cost (body_cost_vec, ncopies_for_cost, vector_stmt, stmt_info, 0, vect_body); - record_stmt_cost (body_cost_vec, ncopies_for_cost, vec_perm, - stmt_info, 0, vect_body); + if (SLP_TREE_TWO_OPERATORS (node)) + { + record_stmt_cost (body_cost_vec, ncopies_for_cost, vector_stmt, + stmt_info, 0, vect_body); + record_stmt_cost (body_cost_vec, ncopies_for_cost, vec_perm, + stmt_info, 0, vect_body); + } } /* Push SLP node def-type to stmts. */ |