From patchwork Tue Sep 25 00:12:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 974190 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-486285-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cavium.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="VR3iktDj"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=CAVIUMNETWORKS.onmicrosoft.com header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b="fc/KFIcP"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42K1jf0W4Gz9s9G for ; Tue, 25 Sep 2018 10:12:35 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type:mime-version; q=dns; s= default; b=gmqxwlcVA4juff+YZXMtHpoxKq5lnghP5f7Gw2/Tfzf4riZGN9zzN bKe2SXlfYN20JMOnDjr+vst8bQvvPRg/otazESYsqXvuOHGyfD8sietImiBU4093 /qzZAGzsUo5VesS627WCjtOcGcOExGd9kNZdhxsHNIt/xcN+DDh/vI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type:mime-version; s= default; bh=kRiGNP5Fq4X9HkJUl8uE7u6zBKU=; b=VR3iktDj8Pxak/seI1i7 GFDtpIt9Cf8L3VVtSM+HpTje+0xMfCt7DzPmbw7bh7VvAq3lFMvKBvgOCexUXXga 3r9lSZbqUHNKSb+y582ZHv2DrNfCpfGono14MMhxvv7OHJ41AAuoMOBNWVHK7e0E vQ0HX79af2a4HDfsjW/XXmw= Received: (qmail 17543 invoked by alias); 25 Sep 2018 00:12:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 17523 invoked by uid 89); 25 Sep 2018 00:12:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=H*c:HHH X-HELO: NAM04-SN1-obe.outbound.protection.outlook.com Received: from mail-eopbgr700067.outbound.protection.outlook.com (HELO NAM04-SN1-obe.outbound.protection.outlook.com) (40.107.70.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Sep 2018 00:12:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pcRDAFa29Y1aPMklcGajv1PF0P5yqmokrfwKsqRY/w4=; b=fc/KFIcP4AB5noqtKS6t7M/bWbBggVF0+wDQpEh+mt3PUCoYUQ1HceUmsCVo8tGI2kDXRTjxIcXFm35vsJBr3iFeeL1PtvG4889YQ5Id0udko9KAYYdlOIZHgMnUpbqaxW6CP85cZ+l9SIhMfEWDZSogOz3Nd0sY1jXBRSseGZw= Received: from MW2PR07MB4009.namprd07.prod.outlook.com (52.132.179.16) by MW2PR07MB3946.namprd07.prod.outlook.com (52.132.178.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Tue, 25 Sep 2018 00:12:23 +0000 Received: from MW2PR07MB4009.namprd07.prod.outlook.com ([fe80::8873:d23b:7ca4:10f3]) by MW2PR07MB4009.namprd07.prod.outlook.com ([fe80::8873:d23b:7ca4:10f3%2]) with mapi id 15.20.1143.022; Tue, 25 Sep 2018 00:12:23 +0000 From: Andrew Pinski To: GCC Patches Subject: [Committed] Fix -mcpu=thunderx and -mcpu=thunderx2t99 Date: Tue, 25 Sep 2018 00:12:23 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Andrew.Pinski@cavium.com; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) MIME-Version: 1.0 Hi, When Naveen committed the following patch: 2017-06-29 Naveen H.S * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the check for CC usage into AARCH64_FUSE_CMP_BRANCH. * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for CC usage from generic code to here. * sched-deps.c (sched_macro_fuse_insns): Move the condition for CC usage into the target macros. He made a small mistake and accessed prev before checking it was NULL in the AARCH64_FUSE_CMP_BRANCH case. This patch fixes the problem. Committed to both the trunk and the GCC 8 branch. Thanks, Andrew Pinski ChangeLog: 2018-09-24 Andrew Pinski * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't access prev before checking it for NULLness in the AARCH64_FUSE_CMP_BRANCH case. Index: config/aarch64/aarch64.c =================================================================== --- config/aarch64/aarch64.c (revision 264547) +++ config/aarch64/aarch64.c (working copy) @@ -16510,8 +16510,6 @@ aarch_macro_fusion_pair_p (rtx_insn *pre if (aarch64_fusion_enabled_p (AARCH64_FUSE_CMP_BRANCH) && any_condjump_p (curr)) { - enum attr_type prev_type = get_attr_type (prev); - unsigned int condreg1, condreg2; rtx cc_reg_1; aarch64_fixed_condition_code_regs (&condreg1, &condreg2); @@ -16521,6 +16519,8 @@ aarch_macro_fusion_pair_p (rtx_insn *pre && prev && modified_in_p (cc_reg_1, prev)) { + enum attr_type prev_type = get_attr_type (prev); + /* FIXME: this misses some which is considered simple arthematic instructions for ThunderX. Simple shifts are missed here. */ if (prev_type == TYPE_ALUS_SREG