diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2005-04-15 16:40:51 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2005-04-15 16:40:51 +0000 |
commit | b0f8196667a9200696f787820178cf7cf2ab5abe (patch) | |
tree | 8619856384988095990f5fb0f012c795edc30373 /gcc/tree-vect-analyze.c | |
parent | 0ad420fe6c4d9f1fa3dbbbca2c62103d18ecfda1 (diff) | |
download | gcc-b0f8196667a9200696f787820178cf7cf2ab5abe.zip gcc-b0f8196667a9200696f787820178cf7cf2ab5abe.tar.gz gcc-b0f8196667a9200696f787820178cf7cf2ab5abe.tar.bz2 |
tree-vect-analyze.c (vect_stmt_relevant_p): Process immediate uses of non-virtual PHI nodes like we use to.
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.
From-SVN: r98192
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r-- | gcc/tree-vect-analyze.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c index 6ece91d..46d7673 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. */ |