diff options
author | abel <abel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-03 12:00:23 +0000 |
---|---|---|
committer | abel <abel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-03 12:00:23 +0000 |
commit | f18c3345e3acc905fb123d58f32f494a0cd4dc76 (patch) | |
tree | 15f9067c1c201d3d8acbf29941863e18c3184345 /gcc/sel-sched.c | |
parent | 2b7454f296fe257571d0d5d27bdd467a6e94dc83 (diff) | |
download | gcc-f18c3345e3acc905fb123d58f32f494a0cd4dc76.tar.gz |
gcc/
PR rtl-optimization/57662
* sel-sched.c (code_motion_path_driver): Do not mark already not
existing blocks in the visiting bitmap.
testsuite/
PR rtl-optimization/57662
* g++.dg/pr57662.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207421 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched.c')
-rw-r--r-- | gcc/sel-sched.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index ad4a0aa5020..d3d73b2b188 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -6741,7 +6741,11 @@ code_motion_path_driver (insn_t insn, av_set_t orig_ops, ilist_t path, the numbering by creating bookkeeping blocks. */ if (removed_last_insn) insn = PREV_INSN (insn); - bitmap_set_bit (code_motion_visited_blocks, BLOCK_FOR_INSN (insn)->index); + + /* If we have simplified the control flow and removed the first jump insn, + there's no point in marking this block in the visited blocks bitmap. */ + if (BLOCK_FOR_INSN (insn)) + bitmap_set_bit (code_motion_visited_blocks, BLOCK_FOR_INSN (insn)->index); return true; } |