diff options
author | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-23 20:28:17 +0000 |
---|---|---|
committer | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-23 20:28:17 +0000 |
commit | a4838119add56937e25718f33215075f4077e029 (patch) | |
tree | bec680c4c53c4351e28e8af67e65118b6db72c5a | |
parent | feddf0dcd5438e3f27f46b18d5a57ac15672c6e1 (diff) | |
download | gcc-a4838119add56937e25718f33215075f4077e029.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232767 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/autopar/pr69426.c | 19 | ||||
-rw-r--r-- | gcc/tree-parloops.c | 1 |
4 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14f990453c2..d45c45f5426 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 27d03891419..0967d44f798 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/gcc.dg/autopar/pr69426.c b/gcc/testsuite/gcc.dg/autopar/pr69426.c new file mode 100644 index 00000000000..e91421cefed --- /dev/null +++ b/gcc/testsuite/gcc.dg/autopar/pr69426.c @@ -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; +} diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 7749d34fab3..52dfc254e62 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -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; |