From patchwork Fri Nov 9 14:14:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 995560 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-489520-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="YscSkBwc"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="DXD1yp9r"; 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 42s2GY1pzcz9sCX for ; Sat, 10 Nov 2018 01:14:45 +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:references:in-reply-to :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=F9DimOl7csgycWZ7aR1ad7pq/Z50SLUBNnVwNg+/uaR1LAInfxTDe qzW6jMoHUKu4oETMoP5i8U02sE82VC0spphiGAwfGFC0jRQ3rzAcNZD6b804A5Yo a8r1qOCqLi62UFM7kGVPu7A9Va4yzuxHZgFlZ0YC14e/GPSQCrSEQM= 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:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s=default; bh=Y2+U80GyqAj7qL5iCFM6GhxXmv4=; b=YscSkBwcuJNU0C2zHKYpv1LcUY4O 4d0kTS+mpoLjgiZp1vKw7C7Arsw2SRYvGNc8gbkvptl20AH+ST+eBrVS911RYCgf lATXr5GJVA+I2SGBh7SRjTOQ1Skdfs1X+cJsjwVnMLsHYiBF99itl4BicFCmHpwB OsAGTmimm9qUvlA= Received: (qmail 26723 invoked by alias); 9 Nov 2018 14:14:38 -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 26670 invoked by uid 89); 9 Nov 2018 14:14:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1104 X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0050.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Nov 2018 14:14:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J6TWfYf1W4Oh0W+ZS1hJCa3m5w2zFU1qC/B8w65UShM=; b=DXD1yp9rVLent1BvAZIH2nDxlaSPeVtUkWsVRgtQlnhkRmeGkmlKLtQvZBWJP3La2Q3o8T67dLfCqaeDvDZexHzYU9C6V3cVRPU9cTRpV/0TvziQSJKdM8FIlp5p7IdLHVhLYQWi7+fjmJDxB+8MM1Y91LYObP1XvJeufErHKos= Received: from DB5PR08MB1030.eurprd08.prod.outlook.com (10.166.14.15) by DB5PR08MB0791.eurprd08.prod.outlook.com (10.164.42.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.21; Fri, 9 Nov 2018 14:14:27 +0000 Received: from DB5PR08MB1030.eurprd08.prod.outlook.com ([fe80::f5c9:8ef6:9b28:8caa]) by DB5PR08MB1030.eurprd08.prod.outlook.com ([fe80::f5c9:8ef6:9b28:8caa%2]) with mapi id 15.20.1294.034; Fri, 9 Nov 2018 14:14:27 +0000 From: Wilco Dijkstra To: GCC Patches CC: nd , James Greenhalgh Subject: [PATCH][AArch64] PR79262: Adjust vector cost Date: Fri, 9 Nov 2018 14:14:27 +0000 Message-ID: References: In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) MIME-Version: 1.0 PR79262 has been fixed for almost all AArch64 cpus, however the example is still vectorized in a few cases, resulting in lower performance.  Increase the cost of vector-to-scalar moves so it is more similar to the other vector costs. As a result -mcpu=cortex-a53 no longer vectorizes the testcase - libquantum and SPECv6 performance improves. OK for commit? ChangeLog: 2018-01-22  Wilco Dijkstra          PR target/79262         * config/aarch64/aarch64.c (generic_vector_cost): Adjust vec_to_scalar_cost. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index c6a83c881038873d8b68e36f906783be63ddde56..43f5b7162152ca92a916f4febee01f624c375202 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -403,7 +403,7 @@ static const struct cpu_vector_cost generic_vector_cost =    1, /* vec_int_stmt_cost  */    1, /* vec_fp_stmt_cost  */    2, /* vec_permute_cost  */ -  1, /* vec_to_scalar_cost  */ +  2, /* vec_to_scalar_cost  */    1, /* scalar_to_vec_cost  */    1, /* vec_align_load_cost  */    1, /* vec_unalign_load_cost  */