diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-30 11:12:36 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-30 11:12:36 +0000 |
commit | 3c4d0a060a1394bde3e2ec70a0a88d8e9859c3b2 (patch) | |
tree | 075379e525e12e54fb4ec6d03faeeca3b482222d /gcc/loop-doloop.c | |
parent | 932540b64852d678add00f9c9e3225e1fc581aed (diff) | |
download | gcc-3c4d0a060a1394bde3e2ec70a0a88d8e9859c3b2.tar.gz |
* loop-doloop.c (add_test): Only add jump notes if we did emit a
jump.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107713 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-doloop.c')
-rw-r--r-- | gcc/loop-doloop.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index 280abddb24d..3fcb79d9dc1 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -244,14 +244,18 @@ add_test (rtx cond, basic_block bb, basic_block dest) do_compare_rtx_and_jump (op0, op1, code, 0, mode, NULL_RTX, NULL_RTX, label); jump = get_last_insn (); - JUMP_LABEL (jump) = label; + /* It is possible for the jump to be optimized out. */ + if (JUMP_P (jump)) + { + JUMP_LABEL (jump) = label; - /* The jump is supposed to handle an unlikely special case. */ - REG_NOTES (jump) - = gen_rtx_EXPR_LIST (REG_BR_PROB, - const0_rtx, REG_NOTES (jump)); + /* The jump is supposed to handle an unlikely special case. */ + REG_NOTES (jump) + = gen_rtx_EXPR_LIST (REG_BR_PROB, + const0_rtx, REG_NOTES (jump)); - LABEL_NUSES (label)++; + LABEL_NUSES (label)++; + } seq = get_insns (); end_sequence (); |