aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-analyze.c
diff options
context:
space:
mode:
authorDorit Nuzman <dorit@gcc.gnu.org>2007-10-23 03:24:06 +0000
committerDorit Nuzman <dorit@gcc.gnu.org>2007-10-23 03:24:06 +0000
commit7de5c6a447ac4c86d737b350b7458c6fe428194c (patch)
treedb2eee15afd72fa434218c912f0986a5697a1aa1 /gcc/tree-vect-analyze.c
parentfc629e9660f855d8ff75f366c2ff7a222544193d (diff)
downloadgcc-7de5c6a447ac4c86d737b350b7458c6fe428194c.zip
gcc-7de5c6a447ac4c86d737b350b7458c6fe428194c.tar.gz
gcc-7de5c6a447ac4c86d737b350b7458c6fe428194c.tar.bz2
re PR tree-optimization/33834 (ICE in vect_get_vec_def_for_operand, at tree-vect-transform.c:1829)
PR tree-optimization/33834 PR tree-optimization/33835 * tree-vect-analyze.c (vect_analyze_operations): RELEVANT and LIVE stmts need to be checked for success seperately. * tree-vect-transform.c (vectorizable_call, vectorizable_conversion): Remove the check that stmt is not LIVE. (vectorizable_assignment, vectorizable_induction): Likewise. (vectorizable_operation, vectorizable_type_demotion): Likewise. (vectorizable_type_promotion, vectorizable_load, vectorizable_store): Likewise. (vectorizable_live_operation): Check that op is not NULL. From-SVN: r129571
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r--gcc/tree-vect-analyze.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index 04257af..b91fbc0 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -482,7 +482,10 @@ vect_analyze_operations (loop_vec_info loop_vinfo)
need_to_vectorize = true;
}
- ok = (vectorizable_type_promotion (stmt, NULL, NULL)
+ ok = true;
+ if (STMT_VINFO_RELEVANT_P (stmt_info)
+ || STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)
+ ok = (vectorizable_type_promotion (stmt, NULL, NULL)
|| vectorizable_type_demotion (stmt, NULL, NULL)
|| vectorizable_conversion (stmt, NULL, NULL, NULL)
|| vectorizable_operation (stmt, NULL, NULL, NULL)
@@ -493,17 +496,29 @@ vect_analyze_operations (loop_vec_info loop_vinfo)
|| vectorizable_condition (stmt, NULL, NULL)
|| vectorizable_reduction (stmt, NULL, NULL));
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump, "not vectorized: relevant stmt not ");
+ fprintf (vect_dump, "supported: ");
+ print_generic_expr (vect_dump, stmt, TDF_SLIM);
+ }
+ return false;
+ }
+
/* Stmts that are (also) "live" (i.e. - that are used out of the loop)
need extra handling, except for vectorizable reductions. */
if (STMT_VINFO_LIVE_P (stmt_info)
&& STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type)
- ok |= vectorizable_live_operation (stmt, NULL, NULL);
+ ok = vectorizable_live_operation (stmt, NULL, NULL);
if (!ok)
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
{
- fprintf (vect_dump, "not vectorized: stmt not supported: ");
+ fprintf (vect_dump, "not vectorized: live stmt not ");
+ fprintf (vect_dump, "supported: ");
print_generic_expr (vect_dump, stmt, TDF_SLIM);
}
return false;
@@ -3250,7 +3265,8 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo)
inner-loop: *(BASE+INIT). (The first location is actually
BASE+INIT+OFFSET, but we add OFFSET separately later. */
tree inner_base = build_fold_indirect_ref
- (fold_build2 (PLUS_EXPR, TREE_TYPE (base), base, init));
+ (fold_build2 (PLUS_EXPR,
+ TREE_TYPE (base), base, init));
if (vect_print_dump_info (REPORT_DETAILS))
{