diff options
author | Richard Biener <rguenther@suse.de> | 2017-01-23 22:29:17 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2017-01-23 15:29:17 -0700 |
commit | 108fdd6d848eb083021de4a43f3e682fa7babbf3 (patch) | |
tree | abeeed22e3f2d4c6218cc99541dddd430b990a67 /gcc/tree-ssa-threadbackward.c | |
parent | 01f26e0e1f69a8462e20a44eb9f15ae9c1b541fe (diff) | |
download | gcc-108fdd6d848eb083021de4a43f3e682fa7babbf3.zip gcc-108fdd6d848eb083021de4a43f3e682fa7babbf3.tar.gz gcc-108fdd6d848eb083021de4a43f3e682fa7babbf3.tar.bz2 |
re PR tree-optimization/79088 (wrong code at -O2 on x86_64-linux-gnu)
2017-01-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/79088
PR tree-optimization/79188
* tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
resetting loop bounds after last path deletion. Reset loop
bounds of the target loop, make code match the comments.
* tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
Make sure loops need no fixups.
* gcc.dg/torture/pr79088.c: New testcase.
* gcc.dg/torture/pr79188.c: Likewise.
From-SVN: r244837
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
-rw-r--r-- | gcc/tree-ssa-threadbackward.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c index e09ecb8..51f30a7 100644 --- a/gcc/tree-ssa-threadbackward.c +++ b/gcc/tree-ssa-threadbackward.c @@ -865,6 +865,8 @@ pass_early_thread_jumps::gate (function *fun ATTRIBUTE_UNUSED) unsigned int pass_early_thread_jumps::execute (function *fun) { + loop_optimizer_init (AVOID_CFG_MODIFICATIONS); + /* Try to thread each block with more than one successor. */ basic_block bb; FOR_EACH_BB_FN (bb, fun) @@ -873,6 +875,8 @@ pass_early_thread_jumps::execute (function *fun) find_jump_threads_backwards (bb, false); } thread_through_all_blocks (true); + + loop_optimizer_finalize (); return 0; } |