diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr64083.c | 17 | ||||
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 10 |
4 files changed, 29 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 999686f6..71828c2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2014-11-27 Richard Biener <rguenther@suse.de> + PR tree-optimization/64083 + * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not + forcibly mark loop for removal the wrong way. + +2014-11-27 Richard Biener <rguenther@suse.de> + PR middle-end/63704 * alias.c (mems_in_disjoint_alias_sets_p): Remove assert and instead return false when !fstrict-aliasing. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5e671fa..5fc10c2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2014-11-27 Richard Biener <rguenther@suse.de> + PR tree-optimization/64083 + * gcc.dg/torture/pr64083.c: New testcase. + +2014-11-27 Richard Biener <rguenther@suse.de> + PR tree-optimization/61634 * gcc.dg/vect/pr61634.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/torture/pr64083.c b/gcc/testsuite/gcc.dg/torture/pr64083.c new file mode 100644 index 0000000..3c3e5a6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr64083.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ + +int a, b; +void +fn1 () +{ + int c = 0; + while (b) + { + switch (c) + case 1: + fn1 (); + if (a) + c = 1; + b = 0; + } +} diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index ca0b8bf..a8243ae 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -2428,16 +2428,8 @@ thread_through_all_blocks (bool may_peel_loop_headers) /* Our path is still valid, thread it. */ if (e->aux) { - struct loop *loop = (*path)[0]->e->dest->loop_father; - if (thread_block ((*path)[0]->e->dest, false)) - { - /* This jump thread likely totally scrambled this loop. - So arrange for it to be fixed up. */ - loop->header = NULL; - loop->latch = NULL; - e->aux = NULL; - } + e->aux = NULL; else { delete_jump_thread_path (path); |