Hi,

The following changes the default behaviour of shift splitting
for MIPS16 e.g. the shifts will be split only when used with
undocumented -mno-debugd option that is now switched on by default.

This appears to enable better optimization in certain cases, and hence,
giving slightly better performance.

Ok to apply?

Regards,
Robert

gcc/
        * config/mips/mips.md (<optab><mode>3): Don't split shifts
        when used with -mdebugd.
        * config/mips/mips.opt (mdebugd): Init to 1 by default.
---
 gcc/config/mips/mips.md  | 1 +
 gcc/config/mips/mips.opt | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 22f4f0b..01d7edd 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -5602,6 +5602,7 @@ (define_expand "<optab><mode>3"
      be careful not to allocate a new register if we've reached the
      reload pass.  */
   if (TARGET_MIPS16
+      && !TARGET_DEBUG_D_MODE
       && optimize
       && CONST_INT_P (operands[2])
       && INTVAL (operands[2]) > 8
diff --git a/gcc/config/mips/mips.opt b/gcc/config/mips/mips.opt
index 53feb23..b6c839d 100644
--- a/gcc/config/mips/mips.opt
+++ b/gcc/config/mips/mips.opt
@@ -127,7 +127,7 @@ mdebug
 Target Var(TARGET_DEBUG_MODE) Undocumented
 
 mdebugd
-Target Var(TARGET_DEBUG_D_MODE) Undocumented
+Target Var(TARGET_DEBUG_D_MODE) Undocumented Init(1)
 
 meb
 Target Report RejectNegative Mask(BIG_ENDIAN)
-- 
2.8.2.396.g5fe494

Reply via email to