diff options
author | Richard Biener <rguenther@suse.de> | 2016-01-18 09:14:14 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-01-18 09:14:14 +0000 |
commit | 995b6fe0f4b4bedb08fdcb9985fbc59d53bae45d (patch) | |
tree | a73c4b1458167194cea1922da58e5334140bbfd6 /gcc/tree-vect-slp.c | |
parent | 99e18f02b63c84747f602abe3ae2b1cb9fb009d3 (diff) | |
download | gcc-995b6fe0f4b4bedb08fdcb9985fbc59d53bae45d.zip gcc-995b6fe0f4b4bedb08fdcb9985fbc59d53bae45d.tar.gz gcc-995b6fe0f4b4bedb08fdcb9985fbc59d53bae45d.tar.bz2 |
re PR tree-optimization/69170 (ICE (segfault) in find_uses_to_rename_use)
2016-01-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/69170
* tree-vect-slp.c (vect_build_slp_tree): Verify we are not
building a vector from scalar results of a pattern stmt.
* gcc.dg/torture/pr69170.c: New testcase.
From-SVN: r232496
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 5767e19..d5bd92e 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -966,7 +966,12 @@ vect_build_slp_tree (vec_info *vinfo, { /* If we have all children of child built up from scalars then just throw that away and build it up this node from scalars. */ - if (!SLP_TREE_CHILDREN (child).is_empty ()) + if (!SLP_TREE_CHILDREN (child).is_empty () + /* ??? Rejecting patterns this way doesn't work. We'd have to + do extra work to cancel the pattern so the uses see the + scalar version. */ + && !is_pattern_stmt_p + (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (child)[0]))) { slp_tree grandchild; @@ -1110,7 +1115,12 @@ vect_build_slp_tree (vec_info *vinfo, /* If we have all children of child built up from scalars then just throw that away and build it up this node from scalars. */ - if (!SLP_TREE_CHILDREN (child).is_empty ()) + if (!SLP_TREE_CHILDREN (child).is_empty () + /* ??? Rejecting patterns this way doesn't work. We'd have + to do extra work to cancel the pattern so the uses see the + scalar version. */ + && !is_pattern_stmt_p + (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (child)[0]))) { unsigned int j; slp_tree grandchild; |