diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-13 14:38:19 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-13 14:38:19 +0000 |
commit | 7f2a705af86615377038781d645108cea546cefe (patch) | |
tree | 1a4b7e231a6e126ccbe261f2381092af256bf239 /gcc/tree-vect-slp.c | |
parent | 28f17529c8d4673d26b8e1c9e0dd87a64a4f0240 (diff) | |
download | gcc-7f2a705af86615377038781d645108cea546cefe.tar.gz |
2015-05-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/66129
* tree-vect-slp.c (vect_build_slp_tree): Make sure all ops are
commutative.
(vect_schedule_slp_instance): Fix typo.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223164 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index c675b1cf5db..b78f7d82d35 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1123,6 +1123,7 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, && oprnds_info[1]->first_dt == vect_internal_def && is_gimple_assign (stmt) && commutative_tree_code (gimple_assign_rhs_code (stmt)) + && !SLP_TREE_TWO_OPERATORS (*node) /* Do so only if the number of not successful permutes was nor more than a cut-ff as re-trying the recursive match on possibly each level of the tree would expose exponential @@ -3459,7 +3460,7 @@ vect_schedule_slp_instance (slp_tree node, slp_instance instance, tree *melts = XALLOCAVEC (tree, TYPE_VECTOR_SUBPARTS (vectype)); for (l = 0; l < TYPE_VECTOR_SUBPARTS (vectype); ++l) { - if (k > group_size) + if (k >= group_size) k = 0; melts[l] = build_int_cst (meltype, mask[k++] * TYPE_VECTOR_SUBPARTS (vectype) + l); |