diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2005-11-30 11:12:36 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2005-11-30 11:12:36 +0000 |
commit | f937df35a46610a9f8eb54d28bcc8f50533c8611 (patch) | |
tree | 075379e525e12e54fb4ec6d03faeeca3b482222d | |
parent | 224b4faf2097f0ed0e5a058ffee9e35fe3827bde (diff) | |
download | gcc-f937df35a46610a9f8eb54d28bcc8f50533c8611.zip gcc-f937df35a46610a9f8eb54d28bcc8f50533c8611.tar.gz gcc-f937df35a46610a9f8eb54d28bcc8f50533c8611.tar.bz2 |
loop-doloop.c (add_test): Only add jump notes if we did emit a jump.
* loop-doloop.c (add_test): Only add jump notes if we did emit a
jump.
From-SVN: r107713
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/loop-doloop.c | 16 |
2 files changed, 15 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8cf398b..ddb830f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-11-30 Nathan Sidwell <nathan@codesourcery.com> + + * loop-doloop.c (add_test): Only add jump notes if we did emit a + jump. + 2005-11-30 Jeff Law <law@redhat.com> * tree-ssa-uncprop.c (associate_equivalences_with_edges): Properly diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index 280abdd..3fcb79d 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 (); |