diff options
author | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-15 13:08:41 +0000 |
---|---|---|
committer | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-15 13:08:41 +0000 |
commit | a6e634c689c9cceec17519cdb7289a0a526860af (patch) | |
tree | 488325a3428239da3b6c7029b84a92513a232674 /gcc/sel-sched-ir.c | |
parent | ce215a841fcaa3ad791e4a2a9f6818890b7cf18b (diff) | |
download | gcc-a6e634c689c9cceec17519cdb7289a0a526860af.tar.gz |
PR rtl-optimization/46649
* sel-sched-ir.c (purge_empty_blocks): Unconditionally skip the first
basic block in the region.
testsuite:
* g++.dg/opt/pr46649.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167854 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched-ir.c')
-rw-r--r-- | gcc/sel-sched-ir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 468dfd7a3e6..43619d9dac4 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -3766,10 +3766,10 @@ tidy_control_flow (basic_block xbb, bool full_tidying) void purge_empty_blocks (void) { - /* Do not attempt to delete preheader. */ - int i = sel_is_loop_preheader_p (BASIC_BLOCK (BB_TO_BLOCK (0))) ? 1 : 0; + int i; - while (i < current_nr_blocks) + /* Do not attempt to delete the first basic block in the region. */ + for (i = 1; i < current_nr_blocks; ) { basic_block b = BASIC_BLOCK (BB_TO_BLOCK (i)); |