pa.c (eligible_for_epilogue_delay): Insns which access %r2 can not be used to...
authorJeff Law <law@gcc.gnu.org>
Sat, 13 Mar 1993 21:47:54 +0000 (14:47 -0700)
committerJeff Law <law@gcc.gnu.org>
Sat, 13 Mar 1993 21:47:54 +0000 (14:47 -0700)
* pa.c eligible_for_epilogue_delay): Insns which access
%r2 can not be used to fill the epilogue's delay slot.

From-SVN: r3727

gcc/config/pa/pa.c

index 2928b89aa823f77db6422effaf143b33e6620c2b..84d1e507113975f7ed0c696a5c174854d8945b01 100644 (file)
@@ -2066,6 +2066,13 @@ eligible_for_epilogue_delay (trial, slot)
     return 0;
   if (get_attr_length (trial) != 1)
     return 0;
+
+  /* The epilogue clobbers whatever value is in %r2 before the 
+     delay slot executes, so insns which use %r2 can not be
+     used to fill the epilogue's delay slot.  */
+  if (refers_to_regno_p (2, 3, PATTERN (trial), NULL_PTR))
+    return 0;
+
   return (get_attr_in_branch_delay (trial) == IN_BRANCH_DELAY_TRUE);
 }