From a412be00c49406889a84791935194fc54a89ff79 Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Fri, 11 Dec 2020 18:27:21 +0200 Subject: [PATCH] arc: Avoid generating brcc instructions with limm BRcc instructions are generated quite late in the compilation process. These instructions combines a compare with a regular conditional branch if the result of the compare is not used anylonger. However, when compiling for size, it is better to avoid BRcc instructions which are introducing a 32-bit long immediate. gcc/ 2020-12-11 Claudiu Zissulescu * config/arc/arc.c (arc_reorg): Avoid limm in BRcc. --- gcc/config/arc/arc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index b80bb9b63a5..27bd458537b 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -8589,6 +8589,7 @@ arc_reorg (void) if (!brcc_nolimm_operator (op, VOIDmode) && !long_immediate_operand (op1, VOIDmode) && (TARGET_ARC700 + || (TARGET_V2 && optimize_size) || next_active_insn (link_insn) != insn)) continue; -- 2.30.2