aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2016-06-03 13:04:01 +0000
committerAlan Hayward <alan.hayward@arm.com>2016-06-03 13:04:01 +0000
commit104ead198b7898679fb68af8d8b537c03343fa24 (patch)
tree99fd49e5d691798fb795a84f777458870da59667 /gcc/tree-vect-loop.c
parentedcfc0afcb2b870c9436315b7ae2fec38afefca0 (diff)
2016-06-03 Alan Hayward <alan.hayward@arm.com>
[3/3] No need to vectorize simple only-live stmts gcc/ * tree-vect-stmts.c (vect_stmt_relevant_p): Do not vectorize non live relevant stmts which are simple and invariant. * tree-vect-loop.c (vectorizable_live_operation): Check relevance instead of simple and invariant testsuite/ * gcc.dg/vect/vect-live-slp-5.c: Remove dg check. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@237065 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 3cf1c795e69..bc1257c86d4 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -6344,11 +6344,12 @@ vectorizable_live_operation (gimple *stmt,
if (nested_in_vect_loop_p (loop, stmt))
return false;
- /* If STMT is a simple assignment and its inputs are invariant, then it can
- remain in place, unvectorized. The original last scalar value that it
- computes will be used. */
- if (is_simple_and_all_uses_invariant (stmt, loop_vinfo))
+ /* If STMT is not relevant and it is a simple assignment and its inputs are
+ invariant then it can remain in place, unvectorized. The original last
+ scalar value that it computes will be used. */
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
{
+ gcc_assert (is_simple_and_all_uses_invariant (stmt, loop_vinfo));
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"statement is simple and uses invariant. Leaving in "