]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
jump.c (redirect_jump_2): Remove REG_CROSSING_JUMP notes when converting a conditiona...
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 14 Jan 2014 14:45:07 +0000 (14:45 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 14 Jan 2014 14:45:07 +0000 (14:45 +0000)
gcc/
* jump.c (redirect_jump_2): Remove REG_CROSSING_JUMP notes when
converting a conditional jump into a conditional return.

From-SVN: r206600

gcc/ChangeLog
gcc/jump.c

index d9d19491f4f7684d9825558b83b54945f920e3f0..ae8d412ec37ecab5f6928f63e6bfe4f51210458a 100644 (file)
@@ -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
index c73d948990c93b06035e7354e7f6d3e0aa5ed962..40dfe6c250cda25171af884b57f03c8a72d9137d 100644 (file)
@@ -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.  */