This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch committed] Fix PR target/39561


The attached patch removes a SH option -mexpand-cbranchdi with
making this option permanent.  -mno-expand-cbranchdi is broken
for a while as pointed out in PR target/39561.  I'd like to
simply remove this undocumented option.  Tested with bootstrap
and regtested successfully on sh4-unknown-linux-gnu.  Applied
on trunk.

Regards,
	kaz
--
2009-05-12  Kaz Kojima  <kkojima@gcc.gnu.org>

	PR target/39561
	* config/sh/sh.h (OPTIMIZATION_OPTIONS): Don't set
	TARGET_EXPAND_CBRANCHDI4.
	* config/sh/sh.md (cbranchdi4): Don't check TARGET_EXPAND_CBRANCHDI4.
	* config/sh/sh.opt (mexpand-cbranchdi): Remove.
	(cmpeqdi): Fix comment.

diff -up ORIG/trunk/gcc/config/sh/sh.h trunk/gcc/config/sh/sh.h
--- ORIG/trunk/gcc/config/sh/sh.h	2009-05-12 22:07:10.000000000 +0900
+++ trunk/gcc/config/sh/sh.h	2009-05-12 22:08:40.000000000 +0900
@@ -473,10 +473,7 @@ do {									\
       sh_div_str = SH_DIV_STR_FOR_SIZE ;				\
     }									\
   else									\
-    {									\
-      TARGET_CBRANCHDI4 = 1;						\
-      TARGET_EXPAND_CBRANCHDI4 = 1;					\
-    }									\
+    TARGET_CBRANCHDI4 = 1;						\
   /* We can't meaningfully test TARGET_SHMEDIA here, because -m options	\
      haven't been parsed yet, hence we'd read only the default.	\
      sh_target_reg_class will return NO_REGS if this is not SHMEDIA, so	\
diff -up ORIG/trunk/gcc/config/sh/sh.md trunk/gcc/config/sh/sh.md
--- ORIG/trunk/gcc/config/sh/sh.md	2009-05-12 19:21:52.000000000 +0900
+++ trunk/gcc/config/sh/sh.md	2009-05-12 20:09:44.000000000 +0900
@@ -1,6 +1,6 @@
 ;;- Machine description for Renesas / SuperH SH.
 ;;  Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;  2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;  2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 ;;  Contributed by Steve Chamberlain (sac@cygnus.com).
 ;;  Improved by Jim Wilson (wilson@cygnus.com).
 
@@ -723,11 +723,9 @@
 
   else
     {
-      if (TARGET_EXPAND_CBRANCHDI4)
-        {
-          if (expand_cbranchdi4 (operands, LAST_AND_UNUSED_RTX_CODE))
-	    DONE;
-        }
+      if (expand_cbranchdi4 (operands, LAST_AND_UNUSED_RTX_CODE))
+	DONE;
+
       comparison = prepare_cbranch_operands (operands, DImode,
 					     LAST_AND_UNUSED_RTX_CODE);
       if (comparison != GET_CODE (operands[0]))
diff -up ORIG/trunk/gcc/config/sh/sh.opt trunk/gcc/config/sh/sh.opt
--- ORIG/trunk/gcc/config/sh/sh.opt	2009-04-07 19:37:50.000000000 +0900
+++ trunk/gcc/config/sh/sh.opt	2009-05-12 20:08:24.000000000 +0900
@@ -1,6 +1,6 @@
 ; Options for the SH port of the compiler.
 
-; Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+; Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 ;
 ; This file is part of GCC.
 ;
@@ -224,13 +224,9 @@ mcbranchdi
 Target Var(TARGET_CBRANCHDI4)
 Enable cbranchdi4 pattern
 
-mexpand-cbranchdi
-Target Var(TARGET_EXPAND_CBRANCHDI4)
-Expand cbranchdi4 pattern early into separate comparisons and branches.
-
 mcmpeqdi
 Target Var(TARGET_CMPEQDI_T)
-Emit cmpeqdi_t pattern even when -mcbranchdi and -mexpand-cbranchdi are in effect.
+Emit cmpeqdi_t pattern even when -mcbranchdi is in effect.
 
 mcut2-workaround
 Target RejectNegative Var(TARGET_SH5_CUT2_WORKAROUND)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]