]> gcc.gnu.org Git - gcc.git/commitdiff
jump.c (returnjump_p): Handle delayed branches.
authorAdam Nemet <anemet@caviumnetworks.com>
Mon, 8 Jun 2009 18:49:17 +0000 (18:49 +0000)
committerAdam Nemet <nemet@gcc.gnu.org>
Mon, 8 Jun 2009 18:49:17 +0000 (18:49 +0000)
* jump.c (returnjump_p): Handle delayed branches.  Add missing
function comment.

From-SVN: r148289

gcc/ChangeLog
gcc/jump.c

index f6bf148c76e2e39e4dedc58fd8f2188da8367806..594c0a6e84f532402ac520a741d4e04004c53dc6 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-08  Adam Nemet  <anemet@caviumnetworks.com>
+
+       * jump.c (returnjump_p): Handle delayed branches.  Add missing
+       function comment.
+
 2009-06-08  Jan Hubicka  <jh@suse.cz>
 
        PR middle-end/40102
index c3af16a06a7ea80b47115a6c372bb2e6a4ceabe1..350de16f07c5f0f9dd7d397fdcf0a6aeeb9c82c0 100644 (file)
@@ -886,11 +886,18 @@ returnjump_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED)
     }
 }
 
+/* Return TRUE if INSN is a return jump.  */
+
 int
 returnjump_p (rtx insn)
 {
+  /* Handle delayed branches.  */
+  if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
+    insn = XVECEXP (PATTERN (insn), 0, 0);
+
   if (!JUMP_P (insn))
     return 0;
+
   return for_each_rtx (&PATTERN (insn), returnjump_p_1, NULL);
 }
 
This page took 0.101519 seconds and 5 git commands to generate.