aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-01-14 14:45:07 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-01-14 14:45:07 +0000
commitdb93087523a4696d5231798e4371ad189cd309df (patch)
tree81c0565010b0383de9606b0d2bb85240b2a5e69d /gcc
parenta0e35eb02c65ca7aa1c429a1032a463129623669 (diff)
downloadgcc-db93087523a4696d5231798e4371ad189cd309df.zip
gcc-db93087523a4696d5231798e4371ad189cd309df.tar.gz
gcc-db93087523a4696d5231798e4371ad189cd309df.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/jump.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d9d1949..ae8d412 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-14 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
+
+ * jump.c (redirect_jump_2): Remove REG_CROSSING_JUMP notes when
+ converting a conditional jump into a conditional return.
+
2014-01-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/58921
diff --git a/gcc/jump.c b/gcc/jump.c
index c73d948..40dfe6c 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. */