aboutsummaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-06-11 15:49:24 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-06-11 13:49:24 +0000
commit4bb83350d48a512294f661a484353481b97e7360 (patch)
tree5a9aabf7b8265d88189e079bc2dd086773323d39 /gcc/jump.c
parent1552f8745719c1b62efc50579e200c7e851924c5 (diff)
downloadgcc-4bb83350d48a512294f661a484353481b97e7360.zip
gcc-4bb83350d48a512294f661a484353481b97e7360.tar.gz
gcc-4bb83350d48a512294f661a484353481b97e7360.tar.bz2
* jump.c (duplicate_loop_exit_test): Fix loop header heuristics.
From-SVN: r43189
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index 067b7aa..cc87b68 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1257,10 +1257,11 @@ duplicate_loop_exit_test (loop_start)
rtx label = JUMP_LABEL (copy);
if (label)
{
- if (PREV_INSN (label)
- && GET_CODE (PREV_INSN (label)) == NOTE
- && (NOTE_LINE_NUMBER (PREV_INSN (label))
- == NOTE_INSN_LOOP_CONT))
+ /* The jump_insn after loop_start should be followed
+ by barrier and loopback label. */
+ if (prev_nonnote_insn (label)
+ && (PREV_INSN (prev_nonnote_insn (label))
+ == NEXT_INSN (loop_start)))
predict_insn_def (copy, PRED_LOOP_HEADER, TAKEN);
else
predict_insn_def (copy, PRED_LOOP_HEADER, NOT_TAKEN);