This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] [ARC] Fix compact casesi option.
- From: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Cc: <Claudiu dot Zissulescu at synopsys dot com>, <Francois dot Bedard at synopsys dot com>, <andrew dot burgess at embecosm dot com>
- Date: Tue, 29 Nov 2016 13:43:21 +0100
- Subject: [PATCH] [ARC] Fix compact casesi option.
- Authentication-results: sourceware.org; auth=none
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