summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-analyze.c
diff options
context:
space:
mode:
authoramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-15 16:40:51 +0000
committeramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-15 16:40:51 +0000
commit0910fd1cd27cfd2f5e7bd716d1feea4b0a664c3b (patch)
tree8619856384988095990f5fb0f012c795edc30373 /gcc/tree-vect-analyze.c
parent00597d77641295c2a41711a6c0439f31c51910e6 (diff)
downloadgcc-0910fd1cd27cfd2f5e7bd716d1feea4b0a664c3b.tar.gz
2005-04-15 Andrew MacLeod <amacleod@redhat.com>
* tree-vect-analyze.c (vect_stmt_relevant_p): Process immediate uses of non-virtual PHI nodes like we use to. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98192 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r--gcc/tree-vect-analyze.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index 6ece91d1eff..46d76731f44 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -2126,16 +2126,30 @@ vect_stmt_relevant_p (tree stmt, loop_vec_info loop_vinfo)
return true;
/* changing memory. */
- if (TREE_CODE (stmt) != PHI_NODE)
+ if (TREE_CODE (stmt) == PHI_NODE)
{
- v_may_defs = STMT_V_MAY_DEF_OPS (stmt);
- v_must_defs = STMT_V_MUST_DEF_OPS (stmt);
- if (v_may_defs || v_must_defs)
+ if (!is_gimple_reg (PHI_RESULT (stmt)))
+ return false;
+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, PHI_RESULT (stmt))
{
- if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC))
- fprintf (vect_dump, "vec_stmt_relevant_p: stmt has vdefs.");
- return true;
+ basic_block bb = bb_for_stmt (USE_STMT (use_p));
+ if (!flow_bb_inside_loop_p (loop, bb))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC))
+ fprintf (vect_dump, "vec_stmt_relevant_p: used out of loop.");
+ return true;
+ }
}
+ return false;
+ }
+
+ v_may_defs = STMT_V_MAY_DEF_OPS (stmt);
+ v_must_defs = STMT_V_MUST_DEF_OPS (stmt);
+ if (v_may_defs || v_must_defs)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC))
+ fprintf (vect_dump, "vec_stmt_relevant_p: stmt has vdefs.");
+ return true;
}
/* uses outside the loop. */