From patchwork Thu Dec 5 14:30:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudakshina Das X-Patchwork-Id: 1204636 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=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-515241-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="PZvrHF9H"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="O89qmmRI"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="O89qmmRI"; 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 47TJ6m0km6z9s4Y for ; Fri, 6 Dec 2019 01:30:55 +1100 (AEDT) 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:cc:subject:date:message-id:content-type:mime-version; q=dns; s=default; b=D9/vzs//QYPeob5v/3iQa7jkMcP5bIc7KcqgUWVlBh/qn6hJRG 6jCGRoCj60T3/ybPJxQzWl89aPecSpvYP5eQ1Ph8CAuXJUp8u3GPcawOmk9aJe00 vCWV1tAfqhYg2yNP5EwCUDwtcBurRXfXsAZuLEcEg7PsbYDZXYgArvmjY= 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:cc:subject:date:message-id:content-type:mime-version; s= default; bh=0bxhxm7iRLfW7EeC+Nsxo3rBywY=; b=PZvrHF9HGc6azSuKWKCl EFIEyJv1Hse+q0KiYsM1mgwOH6jr97YvssbxD1t2S91N2FB5IZKegVeDFk956zd9 s7hmrJpguyLCmZzRrg+vkY9ureHc6ynq/1PbHJUx9TsRiU0uJpPa5xx0iKho8SY0 gXbdECmVQBjABCiQa4T60pw= Received: (qmail 52312 invoked by alias); 5 Dec 2019 14:30:46 -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 38755 invoked by uid 89); 5 Dec 2019 14:30:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 spammy= X-HELO: EUR04-DB3-obe.outbound.protection.outlook.com Received: from mail-eopbgr60076.outbound.protection.outlook.com (HELO EUR04-DB3-obe.outbound.protection.outlook.com) (40.107.6.76) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Dec 2019 14:30:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=viWc9UkNiENICmhSBaPjxfOXzlSMDZtNjKu+8sXeK0s=; b=O89qmmRI281s4a3MsQ9pG3+oP1aMUuqb44s2ZI5/xzY2I2QVYe+815Ltw4CJEYlf5DE1ckASoxSA3i6NnQDqYOulgmH9vG12z1O2Bc8Dt9oMVVzZcKYKD9crMN88rzOE5W79JuWOIKxf9ECDRaPej6pHixCxNXUhlw0m77czrR8= Received: from DB6PR0801CA0053.eurprd08.prod.outlook.com (2603:10a6:4:2b::21) by AM6PR08MB3864.eurprd08.prod.outlook.com (2603:10a6:20b:8e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.22; Thu, 5 Dec 2019 14:30:32 +0000 Received: from VE1EUR03FT031.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::200) by DB6PR0801CA0053.outlook.office365.com (2603:10a6:4:2b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.12 via Frontend Transport; Thu, 5 Dec 2019 14:30:32 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT031.mail.protection.outlook.com (10.152.18.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Thu, 5 Dec 2019 14:30:31 +0000 Received: ("Tessian outbound 25173d5f5683:v37"); Thu, 05 Dec 2019 14:30:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7935c984c261ddb1 X-CR-MTA-TID: 64aa7808 Received: from 47564f844528.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 08A1D275-702D-4FA3-99D8-566E1A357F2C.1; Thu, 05 Dec 2019 14:30:24 +0000 Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 47564f844528.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 05 Dec 2019 14:30:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LYpdbqI/F9c0T8+YS07FF5qbgNt3tinCGs6NmWsQDr5B1SdVvQ5lsCPFL9Bhta/tgaCcS0upG28JVZsh/GLqmrRd42IEqBCCCSv5L5PesM3u9pxfF/3G795zzuNtFkKw7Srla/Q4Qz2j7kFuewo0qEp21yKixu4N+s4QcP/ZCOV3drVH0gHBFnjI3b3O8maqhaQFddfHPfvU9SRFscDcoGzfOeiWYnyUnwFwfzqKJy7VfZQRuNGl+oZr5udKucdCasx0NQQ/Q/XiWrik7EFdpqPtKUx/kbtoOJKUeRavTKjsJNAvk3hm5emg/dJy3oNpHqdppDFRlrACunyjvVDOyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=viWc9UkNiENICmhSBaPjxfOXzlSMDZtNjKu+8sXeK0s=; b=T7CWkIhsauwbI3gNMg+8TQodCcXqJK15vlD6JttehaLfmW3gssrE0cXMgDSs71N6gNsXHx4ZDFqCUap2cvAPFIrLEUS14CUPjPnPwrQGQC5bczVMpvGftv95+tD80idIVg2JxcY4mZm92T4kI9ku/Z6PpACYwfYvDtJCiPsx7Tt0XSLJ9ke8WPGOpIzrOHvtVLnzStaW/scFf+NQfZhhCWDLZyONPlmCBOWeQHPrNPj7ZDvTbwgNRDUOg5uE7tn0AlQTUYRbi+DRQSdq2VsZKlXlYXXMsrLZbiTH6Ar7FtgQ5wkjrRgp8fCMSXDv/TuPXp7v+cSxH8skTGPkttAvkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=viWc9UkNiENICmhSBaPjxfOXzlSMDZtNjKu+8sXeK0s=; b=O89qmmRI281s4a3MsQ9pG3+oP1aMUuqb44s2ZI5/xzY2I2QVYe+815Ltw4CJEYlf5DE1ckASoxSA3i6NnQDqYOulgmH9vG12z1O2Bc8Dt9oMVVzZcKYKD9crMN88rzOE5W79JuWOIKxf9ECDRaPej6pHixCxNXUhlw0m77czrR8= Received: from VI1PR08MB3888.eurprd08.prod.outlook.com (20.178.14.20) by VI1PR08MB2926.eurprd08.prod.outlook.com (10.170.239.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.14; Thu, 5 Dec 2019 14:30:21 +0000 Received: from VI1PR08MB3888.eurprd08.prod.outlook.com ([fe80::40e5:42e4:9f0d:ce8a]) by VI1PR08MB3888.eurprd08.prod.outlook.com ([fe80::40e5:42e4:9f0d:ce8a%5]) with mapi id 15.20.2516.014; Thu, 5 Dec 2019 14:30:21 +0000 From: Sudakshina Das To: "gcc-patches@gcc.gnu.org" CC: Richard Sandiford Subject: [Patch, GCC] Fix a condition post r278611 Date: Thu, 5 Dec 2019 14:30:21 +0000 Message-ID: <384f1f8c-bc48-36fa-9f7d-aae99b6e846a@arm.com> Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Sudi.Das@arm.com; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:3044;OLM:3044; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(376002)(39860400002)(346002)(396003)(136003)(366004)(199004)(189003)(54534003)(2616005)(36756003)(14444005)(305945005)(86362001)(71200400001)(31696002)(81156014)(66446008)(6916009)(5640700003)(6512007)(71190400001)(2906002)(6486002)(81166006)(8676002)(99286004)(31686004)(102836004)(478600001)(186003)(5660300002)(52116002)(25786009)(4326008)(8936002)(14454004)(66946007)(66476007)(66556008)(64756008)(26005)(66616009)(316002)(6506007)(4744005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB2926; H:VI1PR08MB3888.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fbZIWS+3PY0awaAU7gOZGTsKIZOtxpvWouyUkoYQ/Qaze9KIebsGysRhMUPdIdsiDXKWHINrP+GVT8k14JiQOuvk3hKiDlbpW90IC/3Myz5sh71rfHGzT5hLDe9dSTGreVh/mubUKDyCk7ZTtGFmvc4RFwB/19YBeuC7c3pWyyh3UlRN8cICh3BHaxJmiXOd6EjXXsd1koJ7hkPjr2aYmXIQpTrWDDMweLUwKSFKq2RC+ssqi7TNaVDOQdLcItOAEkmFxDIjpfL4rks1loWfdvvwSJIz29lfFSKlbvGz9uRgZTOqlEYnIX4pUH6eEzMyAoIK/HENuVBjEFDPf2h6t2CxSIHCeyfG0VFjQhPcXUUPrT7IDcd10+i3qFhUStWSuKvg0SwgsPuZPxE9DoCM/T3msZt9/7+xqIymDVR7rNZOG+4colHKuwF3QVGYjpRnAbkncBuchzm1Ag+LNvrohwkEYDs5WYlpg9ov0BmGW2TI2yiDoG5PP3jrcEI3PPjt x-ms-exchange-transport-forked: True MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Sudi.Das@arm.com; X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT031.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 939a9b9b-3b54-4625-d0ab-08d7798fa86b X-IsSubscribed: yes Hi While looking at vect_model_reduction_cost function, it seems Richard's change in a recent commit r278611 missed an update to the following if condition. Since the check for EXTRACT_LAST_REDUCTION is now split above, the same check in the if condition will never be true. gcc/ChangeLog 2019-xx-xx Sudakshina Das * tree-vect-loop.c (vect_model_reduction_cost): Remove reduction_type check from if condition. Is this ok for trunk? Thanks Sudi diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index ca8c818..7469204 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -3933,7 +3933,7 @@ vect_model_reduction_cost (stmt_vec_info stmt_info, internal_fn reduc_fn, /* No extra instructions needed in the prologue. */ prologue_cost = 0; - if (reduction_type == EXTRACT_LAST_REDUCTION || reduc_fn != IFN_LAST) + if (reduc_fn != IFN_LAST) /* Count one reduction-like operation per vector. */ inside_cost = record_stmt_cost (cost_vec, ncopies, vec_to_scalar, stmt_info, 0, vect_body);