diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-11-10 09:29:52 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-11-10 09:29:52 +0100 |
commit | 78048b1c66c31b87770b8a29fa44fc291213fd9b (patch) | |
tree | 17a0e0e6943fabe7f2cd14633582a9f31eb0a0ed /gcc/tree-vect-loop.c | |
parent | 136a1c15d70712b65429ca8028fb2fe2d38df501 (diff) | |
download | gcc-78048b1c66c31b87770b8a29fa44fc291213fd9b.zip gcc-78048b1c66c31b87770b8a29fa44fc291213fd9b.tar.gz gcc-78048b1c66c31b87770b8a29fa44fc291213fd9b.tar.bz2 |
re PR tree-optimization/51000 (ICE: in vect_get_store_cost, at tree-vect-stmts.c:923 on powerpc-apple-darwin9)
PR tree-optimization/51000
* tree-vect-patterns.c (vect_recog_bool_pattern): If adding
a pattern stmt for a bool store, adjust DR_STMT too.
Don't handle bool conversions to single bit precision lhs.
* tree-vect-stmts.c (vect_remove_stores): If next is a pattern
stmt, remove its related stmt and free its stmt_vinfo.
(free_stmt_vec_info): Free also pattern stmt's vinfo and
pattern def stmt's vinfo.
* tree-vect-loop.c (destroy_loop_vec_info): Don't try to
free pattern stmt's vinfo here.
(vect_transform_loop): When calling vect_remove_stores,
do gsi_next first and don't call gsi_remove. If not strided
store, free stmt vinfo for gsi_stmt (si) rather than stmt.
* gcc.dg/vect/pr51000.c: New test.
From-SVN: r181250
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index dca1c34..fb15d6e 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -872,21 +872,8 @@ destroy_loop_vec_info (loop_vec_info loop_vinfo, bool clean_stmts) for (si = gsi_start_bb (bb); !gsi_end_p (si); ) { gimple stmt = gsi_stmt (si); - stmt_vec_info stmt_info = vinfo_for_stmt (stmt); - - if (stmt_info) - { - /* Check if this statement has a related "pattern stmt" - (introduced by the vectorizer during the pattern recognition - pass). Free pattern's stmt_vec_info. */ - if (STMT_VINFO_IN_PATTERN_P (stmt_info) - && vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_info))) - free_stmt_vec_info (STMT_VINFO_RELATED_STMT (stmt_info)); - - /* Free stmt_vec_info. */ - free_stmt_vec_info (stmt); - } - + /* Free stmt_vec_info. */ + free_stmt_vec_info (stmt); gsi_next (&si); } } @@ -5349,14 +5336,14 @@ vect_transform_loop (loop_vec_info loop_vinfo) /* Interleaving. If IS_STORE is TRUE, the vectorization of the interleaving chain was completed - free all the stores in the chain. */ + gsi_next (&si); vect_remove_stores (GROUP_FIRST_ELEMENT (stmt_info)); - gsi_remove (&si, true); continue; } else { /* Free the attached stmt_vec_info and remove the stmt. */ - free_stmt_vec_info (stmt); + free_stmt_vec_info (gsi_stmt (si)); gsi_remove (&si, true); continue; } |