From patchwork Fri Dec 11 16:29:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Zissulescu X-Patchwork-Id: 1415027 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=fWbC2QN7; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Csx7w21Y6z9sSs for ; Sat, 12 Dec 2020 03:29:32 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EB1A2397300F; Fri, 11 Dec 2020 16:29:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB1A2397300F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1607704170; bh=ozpiu6X20Vy5oujR8mN+Ed1paNZ8P3kMxbmNHDRRYk8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=fWbC2QN7wOz3KneG37ZUiGjO5mJoQgSXf0jgPJUvBZAITY8znv5FotJU1G4vqHuSk hmJd/+H0a1opxE+OfV5Kv3vHlXGZl6I2cbu7V9qDyaqtO9px3v2UABOhi5LNj6+BdP HNZjP8QBkb/uPq/xJ2amT+JB1Q2GFsRZBxKME9jE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id CFABF397300F for ; Fri, 11 Dec 2020 16:29:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CFABF397300F Received: by mail-wr1-x42c.google.com with SMTP id c5so6004381wrp.6 for ; Fri, 11 Dec 2020 08:29:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ozpiu6X20Vy5oujR8mN+Ed1paNZ8P3kMxbmNHDRRYk8=; b=HGBOgnrg65i8Y5MhTMIHWniyEoWzXBndRs5VpUdHI8UpYtShVTLL7jvaviC0+k8joJ HW3Pn6zLRZZB1i9/ZHmljSa9LxXWIluih+GiVJd7DnvuYQ4q4ZKRM1Gt57uk0I3pwgbN hCOt5rSt1AFo4pEo7HwFUvNaYNE9ziJe1gwjqbhNZmjIe1sP1IiBWD1EKAhyd/4TS58B vqI3TJWxFT1fF3bPKuf9X7omJuDJm2DK/OSB/suceIkn5Cf/pQLMGsVpZe3NiDq7VZJp ekVK92k2NLT0cAUewIe2yFdjDbDW4wFXHkM+c7y/Rm2kgkOSQdHWgEgzsGrZXxCyVeI0 h2bg== X-Gm-Message-State: AOAM533WO35EcwF73LpKKFnHlEitkt6h+Mk7IuMflQXdY+i5Ru7unSmV EH+Re/IqQfg/ulhm20HrlwMqAO/6za7FYQ== X-Google-Smtp-Source: ABdhPJxRFgB8zQnXbib141W7zbSxPMBbRyAcdSaqjTP7A9Cbe2CKMVCMYDktqMxc3wHoZAnalf9seA== X-Received: by 2002:a05:6000:101:: with SMTP id o1mr14721692wrx.211.1607704165741; Fri, 11 Dec 2020 08:29:25 -0800 (PST) Received: from localhost.localdomain ([89.46.102.116]) by smtp.gmail.com with ESMTPSA id z15sm16761568wrv.67.2020.12.11.08.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 08:29:25 -0800 (PST) X-Google-Original-From: Claudiu Zissulescu To: gcc-patches@gcc.gnu.org Subject: [committed] arc: Avoid generating brcc instructions with limm Date: Fri, 11 Dec 2020 18:29:18 +0200 Message-Id: <20201211162919.1034384-1-claziss@synopsys.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Claudiu Zissulescu via Gcc-patches From: Claudiu Zissulescu Reply-To: Claudiu Zissulescu Cc: fbedard@synopsys.com, claziss@synopsys.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" From: Claudiu Zissulescu 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;