From: Richard Sandiford Date: Tue, 14 Jan 2014 14:45:07 +0000 (+0000) Subject: jump.c (redirect_jump_2): Remove REG_CROSSING_JUMP notes when converting a conditiona... X-Git-Tag: releases/gcc-4.9.0~1675 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db93087523a4696d5231798e4371ad189cd309df;p=thirdparty%2Fgcc.git jump.c (redirect_jump_2): Remove REG_CROSSING_JUMP notes when converting a conditional jump into a... gcc/ * jump.c (redirect_jump_2): Remove REG_CROSSING_JUMP notes when converting a conditional jump into a conditional return. From-SVN: r206600 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9d19491f4f7..ae8d412ec37e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-01-14 Richard Sandiford + + * jump.c (redirect_jump_2): Remove REG_CROSSING_JUMP notes when + converting a conditional jump into a conditional return. + 2014-01-14 Richard Biener PR tree-optimization/58921 diff --git a/gcc/jump.c b/gcc/jump.c index c73d948990c9..40dfe6c250cd 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -1580,6 +1580,16 @@ redirect_jump_2 (rtx jump, rtx olabel, rtx nlabel, int delete_unused, } } + /* Handle the case where we had a conditional crossing jump to a return + label and are now changing it into a direct conditional return. + The jump is no longer crossing in that case. */ + if (ANY_RETURN_P (nlabel)) + { + note = find_reg_note (jump, REG_CROSSING_JUMP, NULL_RTX); + if (note) + remove_note (jump, note); + } + if (!ANY_RETURN_P (olabel) && --LABEL_NUSES (olabel) == 0 && delete_unused > 0 /* Undefined labels will remain outside the insn stream. */