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] [ARC] Fix compact casesi option.


Fixing casesi option for ARCv2 cpus.

Ok to apply?
Claudiu

gcc/
2016-11-28  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_override_options): Avoid selection of
	compact casesi for ARCv2.
---
 gcc/config/arc/arc.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 31b4147..f2575b5 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -874,11 +874,13 @@ arc_override_options (void)
     optimize_size = 1;
 
   /* Compact casesi is not a valid option for ARCv2 family.  */
-  if (TARGET_V2
-      && TARGET_COMPACT_CASESI)
+  if (TARGET_V2)
     {
-      warning (0, "compact-casesi is not applicable to ARCv2");
-      TARGET_COMPACT_CASESI = 0;
+      if (TARGET_COMPACT_CASESI)
+	{
+	  warning (0, "compact-casesi is not applicable to ARCv2");
+	  TARGET_COMPACT_CASESI = 0;
+	}
     }
   else if (optimize_size == 1
 	   && !global_options_set.x_TARGET_COMPACT_CASESI)
-- 
1.9.1


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