From patchwork Mon Oct 9 20:46:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pat Haugen X-Patchwork-Id: 823501 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-463822-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Y0L9LEwA"; 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 3y9sjg6swfz9s7v for ; Tue, 10 Oct 2017 07:46:46 +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 :subject:to:cc:date:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=HmU4Y 9IBa1uHUFV6fDfqXoL+8jh3sjNmLMytGDzp5t8dRmhV3EYGoe5mawCLG4zE7TJKH 2Ec9bbQoTO7zia2K84RQcmuPDFwKteaEO08gDKGvISZNFF+ACzrBhSJt/bmlrFuZ eSictUwMv1vcM/ugHpi9jX1pp92JKQ3qSfdARY= 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 :subject:to:cc:date:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=Y7YAFoO6r8I tWPJ3nIWKvQTQKdg=; b=Y0L9LEwA8Vs6RWRz5oFDaQcnckZ5oDmbsVVxxrea5dT WHRPX0SA9+tGH/Kpb9KNUtQTQykEYnGYkGYuH2EWnoXTzEYovpsdc50raX9naLKR YIWtzCUtZW8BVNKBubrlV3SPGPhWDd23OSxi2yxh4phBL+EQXixGYrD2Li+H8PVk = Received: (qmail 125099 invoked by alias); 9 Oct 2017 20:46:29 -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 124784 invoked by uid 89); 9 Oct 2017 20:46:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=(unknown) X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Oct 2017 20:46:28 +0000 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v99Ki3G3076386 for ; Mon, 9 Oct 2017 16:46:22 -0400 Received: from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159]) by mx0b-001b2d01.pphosted.com with ESMTP id 2dgcabn0wp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 09 Oct 2017 16:46:22 -0400 Received: from localhost by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Oct 2017 14:46:21 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 9 Oct 2017 14:46:19 -0600 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v99KkIQJ9503148; Mon, 9 Oct 2017 13:46:18 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1AACC6A03B; Mon, 9 Oct 2017 14:46:19 -0600 (MDT) Received: from oc1687012634.ibm.com (unknown [9.80.213.168]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP id 7D3F06A047; Mon, 9 Oct 2017 14:46:18 -0600 (MDT) From: Pat Haugen Subject: [PATCH, rs6000] Correct unaligned_load vector cost for Power9 To: GCC Patches Cc: Segher Boessenkool , David Edelsohn Date: Mon, 9 Oct 2017 15:46:17 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 17100920-0028-0000-0000-0000087A2F67 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007869; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000235; SDB=6.00928786; UDB=6.00467448; IPR=6.00709057; BA=6.00005631; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017463; XFM=3.00000015; UTC=2017-10-09 20:46:20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17100920-0029-0000-0000-000037DE7A95 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-09_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710090301 X-IsSubscribed: yes Power9 has efficient unaligned load insns. The following patch fixes the cost to reflect that. There was no similar code for the unaligned_store case. Bootstrap/regtest on powerpc64le-linux with no new regressions. Ok for trunk? -Pat 2017-10-09 Pat Haugen * config/rs6000/power9.c (rs6000_builtin_vectorization_cost): Remove TARGET_P9_VECTOR code for unaligned_load case. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 253547) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -5438,9 +5438,6 @@ rs6000_builtin_vectorization_cost (enum return 3; case unaligned_load: - if (TARGET_P9_VECTOR) - return 3; - if (TARGET_EFFICIENT_UNALIGNED_VSX) return 1;