Fix clobber removal in parloops

2016-01-23  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69426
	* tree-parloops.c (eliminate_local_variables_stmt): Handle vdef of
	removed clobber.

	* gcc.dg/autopar/pr69426.c: New test.

From-SVN: r232767
This commit is contained in:
Tom de Vries 2016-01-23 20:28:17 +00:00 committed by Tom de Vries
parent 69da78025e
commit 42fb90d7a5
4 changed files with 31 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2016-01-23 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/69426
* tree-parloops.c (eliminate_local_variables_stmt): Handle vdef of
removed clobber.
2016-01-23 Jakub Jelinek <jakub@redhat.com>
* tree-ssanames.c (release_free_names_and_compact_live_names): Replace

View file

@ -1,3 +1,8 @@
2016-01-23 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/69426
* gcc.dg/autopar/pr69426.c: New test.
2016-01-23 Martin Sebor <msebor@redhat.com>
PR c++/58109

View file

@ -0,0 +1,19 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-parallelize-loops=2" } */
int iq;
void
mr(void)
{
unsigned int i8;
for (i8 = 0; i8 != 1; i8 += 3) {
void *f0[] = { f0 };
int hv;
for (; hv < 1; ++hv)
iq = 0;
}
++iq;
}

View file

@ -725,6 +725,7 @@ eliminate_local_variables_stmt (edge entry, gimple_stmt_iterator *gsi,
}
else if (gimple_clobber_p (stmt))
{
unlink_stmt_vdef (stmt);
stmt = gimple_build_nop ();
gsi_replace (gsi, stmt, false);
dta.changed = true;