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-patterns.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-patterns.c')
-rw-r--r-- | gcc/tree-vect-patterns.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 19b75e9..d260e80 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -2041,7 +2041,8 @@ vect_recog_bool_pattern (VEC (gimple, heap) **stmts, tree *type_in, rhs_code = gimple_assign_rhs_code (last_stmt); if (CONVERT_EXPR_CODE_P (rhs_code)) { - if (TREE_CODE (TREE_TYPE (lhs)) != INTEGER_TYPE) + if (TREE_CODE (TREE_TYPE (lhs)) != INTEGER_TYPE + || TYPE_PRECISION (TREE_TYPE (lhs)) == 1) return NULL; vectype = get_vectype_for_scalar_type (TREE_TYPE (lhs)); if (vectype == NULL_TREE) @@ -2096,6 +2097,7 @@ vect_recog_bool_pattern (VEC (gimple, heap) **stmts, tree *type_in, STMT_VINFO_DR_STEP (pattern_stmt_info) = STMT_VINFO_DR_STEP (stmt_vinfo); STMT_VINFO_DR_ALIGNED_TO (pattern_stmt_info) = STMT_VINFO_DR_ALIGNED_TO (stmt_vinfo); + DR_STMT (STMT_VINFO_DATA_REF (stmt_vinfo)) = pattern_stmt; *type_out = vectype; *type_in = vectype; VEC_safe_push (gimple, heap, *stmts, last_stmt); |