2013-04-17 Greta Yorsh <Greta.Yorsh at arm.com>
authorGreta Yorsh <greta.yorsh@arm.com>
Wed, 17 Apr 2013 15:17:10 +0000 (16:17 +0100)
committerGreta Yorsh <gretay@gcc.gnu.org>
Wed, 17 Apr 2013 15:17:10 +0000 (16:17 +0100)
* config/arm/arm.c (use_return_insn): Return 0 for targets that
can benefit from using a sequence of LDRD instructions in epilogue
instead of a single LDM instruction.

From-SVN: r198029

gcc/ChangeLog
gcc/config/arm/arm.c

index 3e6f3f134d2aadbb1b6e4f81a5ee2a83ff93f187..41c9a33c21ebb285d78fd2dedf8c451fe2545da7 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-17  Greta Yorsh  <Greta.Yorsh at arm.com>
+
+       * config/arm/arm.c (use_return_insn): Return 0 for targets that
+       can benefit from using a sequence of LDRD instructions in epilogue
+       instead of a single LDM instruction.
+
 2013-04-17  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
        PR 45688
index bac709f1fa372cbe1955322ef71a402996f666fb..9088d1a64ab4817c9ea84570368788b4e876af94 100644 (file)
@@ -2412,6 +2412,10 @@ use_return_insn (int iscond, rtx sibling)
   if (IS_INTERRUPT (func_type) && (frame_pointer_needed || TARGET_THUMB))
     return 0;
 
+  if (TARGET_LDRD && current_tune->prefer_ldrd_strd
+      && !optimize_function_for_size_p (cfun))
+    return 0;
+
   offsets = arm_get_frame_offsets ();
   stack_adjust = offsets->outgoing_args - offsets->saved_regs;