From ac6aeab4d7f1f7f003474e325b1edf8ec52b18c0 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 9 Dec 2014 09:13:18 +0000 Subject: [PATCH] re PR tree-optimization/64191 (indirect clobbers messes up dead code elimination in loop calling dtor) 2014-12-09 Richard Biener PR tree-optimization/64191 * tree-vect-stmts.c (vect_stmt_relevant_p): Clobbers are not relevant (nor are their uses). From-SVN: r218509 --- gcc/ChangeLog | 6 ++++++ gcc/tree-vect-stmts.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ca94246784..4a5de9ee59a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-09 Richard Biener + + PR tree-optimization/64191 + * tree-vect-stmts.c (vect_stmt_relevant_p): Clobbers are + not relevant (nor are their uses). + 2014-12-09 Ilya Enkovich * lto/lto-partition.c (privatize_symbol_name): Correctly diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 6903f0a2e00..52f9d31b530 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -340,7 +340,8 @@ vect_stmt_relevant_p (gimple stmt, loop_vec_info loop_vinfo, /* changing memory. */ if (gimple_code (stmt) != GIMPLE_PHI) - if (gimple_vdef (stmt)) + if (gimple_vdef (stmt) + && !gimple_clobber_p (stmt)) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, -- 2.30.2