summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-07-16 16:41:40 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-07-16 16:41:40 +0000
commit47fc9fbc83746cc26ddd50e5c40b4404458fb800 (patch)
tree9b5bba4b36493a559058a3613f73b80c24c7658f
parent3f377a855ee835de3311ea426f7a18615736e4b9 (diff)
Backport a gcc3 fix:
* cse.c (cse_end_of_basic_block): Don't return the end of a basi block reached by a branch if we're not going to actually process this block
-rw-r--r--gnu/egcs/gcc/cse.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/cse.c b/gnu/egcs/gcc/cse.c
index 4a0f25983cf..08f5cfac593 100644
--- a/gnu/egcs/gcc/cse.c
+++ b/gnu/egcs/gcc/cse.c
@@ -8574,6 +8574,15 @@ cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks)
path_size--;
}
+ /* If the first instruction is marked with QImode, that means we've
+ already processed this block. Our caller will look at DATA->LAST
+ to figure out where to go next. We want to return the next block
+ in the instruction stream, not some branched-to block somewhere
+ else. We accomplish this by pretending our called forbid us to
+ follow jumps, or skip blocks. */
+ if (GET_MODE (insn) == QImode)
+ follow_jumps = skip_blocks = 0;
+
/* Scan to end of this basic block. */
while (p && GET_CODE (p) != CODE_LABEL)
{