From patchwork Fri Nov 18 20:38:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 696745 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3tL8wr67ptz9t0w for ; Sat, 19 Nov 2016 07:39:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="rUD0H6CN"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:mime-version:content-type:message-id; q=dns; s= default; b=TJgmk/g3V2sSosoH0+Agog2T9TCCTsRJV4k4W46NUKEaJ/nguQ/SP nQWS9LmfugSeRlCRg4OS2huBgeidEW/I3qdRRW1Gae17BLTv5Sq5reUrl83miWSX oc5Px/ACvwr1lgbK66PlWyPMZcqoJ9Ktoi5WGdq14T36JYTJG594r4= 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:date :from:to:subject:mime-version:content-type:message-id; s= default; bh=CHK+8uVc62AU7cacXGjm5NV3eFQ=; b=rUD0H6CNYx0T4F2wnZuG p2moCeYPZMt+fRhu0vxxQKSbn2Mvgut4h+vWJadajm9JAXbtUvspc7THG4+tbGRU +mwlDQ3gSlJXshduoCylhlISIpnBUWr1dEcEO6Px2f/ppWwbGkNaQb5ZJQiO+iGC V12ifveP3ZYPg+SfaRbjgJE= Received: (qmail 99233 invoked by alias); 18 Nov 2016 20:38:57 -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 99205 invoked by uid 89); 18 Nov 2016 20:38:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_SEMBACKSCATTER autolearn=no version=3.3.2 spammy=mfvsrd, xscvdpsxws, xscvdpuxws, fctiwuz X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Nov 2016 20:38:46 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAIKcfJa131644 for ; Fri, 18 Nov 2016 15:38:44 -0500 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0a-001b2d01.pphosted.com with ESMTP id 26t2tv0vuc-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 18 Nov 2016 15:38:44 -0500 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 Nov 2016 15:38:43 -0500 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 18 Nov 2016 15:38:41 -0500 Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id B2AFAC90041; Fri, 18 Nov 2016 15:38:24 -0500 (EST) Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uAIKce2E16122144; Fri, 18 Nov 2016 20:38:40 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 68E95124035; Fri, 18 Nov 2016 15:38:40 -0500 (EST) Received: from ibm-tiger.the-meissners.org (unknown [9.32.77.111]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id 402A712403D; Fri, 18 Nov 2016 15:38:40 -0500 (EST) Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id 77893476C9; Fri, 18 Nov 2016 15:38:39 -0500 (EST) Date: Fri, 18 Nov 2016 15:38:38 -0500 From: Michael Meissner To: gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt Subject: [PATCH], Tweak PowerPC movdi constraints Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16111820-0044-0000-0000-000001CB44A1 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006100; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000189; SDB=6.00782545; UDB=6.00377629; IPR=6.00560015; BA=6.00004892; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013372; XFM=3.00000011; UTC=2016-11-18 20:38:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16111820-0045-0000-0000-000005F84AB0 Message-Id: <20161118203838.GA16377@ibm-tiger.the-meissners.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-11-18_11:, , 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-1609300000 definitions=main-1611180346 X-IsSubscribed: yes This patch tweaks the movdi constraints for the PowerPC to use "^" or "$" constraints instead of "?*". This allows the register allocator to more often allocate DImode to a floating point/vector register when it is desirable to do so. I did a full Spec 2006 run with this patch installed, and most of the benchmarks were neutral in terms of performance. The 482.sphinx3 benchmark had a 2.5% performance boost with these patches. There were no benchmarks that regressed with this patch. I built bootstrap compilers and did make check with no regressions on: 1) Little endian power8, --with-cpu=power8 2) Big endian power8, --with-cpu=power8 (no 32-bit support) 3) Big endian power7, --with-cpu=power7 (both 32/64-bit support) Can I check this patch into the trunk? [gcc] 2016-11-18 Michael Meissner * config/rs6000/rs6000.md (movdi_internal32): Change FPR/VSX "?*" load/store constraints to "^" if the instruction allows d-form addressing or "$" if it only allows x-form addressing. Change FPR/VSX move constraints to "^". (movdi_internal64): Likewise. [gcc/testsuite] 2016-11-18 Michael Meissner * gcc.target/powerpc/ppc-round2.c: Allow XSCVDPSXWS and XSCVDPUXWS to be generated instead of FCTIWUZ or FCTIWZ. Index: gcc/config/rs6000/rs6000.md =================================================================== --- gcc/config/rs6000/rs6000.md (.../svn+ssh://meissner@gcc.gnu.org/svn/gcc/trunk/gcc/config/rs6000) (revision 242556) +++ gcc/config/rs6000/rs6000.md (.../gcc/config/rs6000) (working copy) @@ -8118,10 +8118,10 @@ (define_insn "p8_mfvsrd_4_disf" (define_insn "*movdi_internal32" [(set (match_operand:DI 0 "rs6000_nonimmediate_operand" - "=Y, r, r, ?m, ?*d, ?*d, - r, ?wY, ?Z, ?*wb, ?*wv, ?wi, - ?wo, ?wo, ?wv, ?wi, ?wi, ?wv, - ?wv") + "=Y, r, r, ^m, ^d, ^d, + r, ^wY, $Z, ^wb, $wv, ^wi, + *wo, *wo, *wv, *wi, *wi, *wv, + *wv") (match_operand:DI 1 "input_operand" "r, Y, r, d, m, d, @@ -8195,9 +8195,9 @@ (define_split (define_insn "*movdi_internal64" [(set (match_operand:DI 0 "nonimmediate_operand" "=Y, r, r, r, r, r, - ?m, ?*d, ?*d, ?wY, ?Z, ?*wb, - ?*wv, ?wi, ?wo, ?wo, ?wv, ?wi, - ?wi, ?wv, ?wv, r, *h, *h, + ^m, ^d, ^d, ^Y, $Z, $wb, + $wv, ^wi, *wo, *wo, *wv, *wi, + *wi, *wv, *wv, r, *h, *h, ?*r, ?*wg, ?*r, ?*wj") (match_operand:DI 1 "input_operand" Index: gcc/testsuite/gcc.target/powerpc/ppc-round2.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/ppc-round2.c (.../svn+ssh://meissner@gcc.gnu.org/svn/gcc/trunk/gcc/testsuite/gcc.target/powerpc) (revision 242556) +++ gcc/testsuite/gcc.target/powerpc/ppc-round2.c (.../gcc/testsuite/gcc.target/powerpc) (working copy) @@ -5,8 +5,8 @@ /* { dg-options "-O2 -mcpu=power8" } */ /* { dg-final { scan-assembler-times "fcfid " 2 } } */ /* { dg-final { scan-assembler-times "fcfids " 2 } } */ -/* { dg-final { scan-assembler-times "fctiwuz " 2 } } */ -/* { dg-final { scan-assembler-times "fctiwz " 2 } } */ +/* { dg-final { scan-assembler-times "fctiwuz \|xscvdpuxws " 2 } } */ +/* { dg-final { scan-assembler-times "fctiwz \|xscvdpsxws " 2 } } */ /* { dg-final { scan-assembler-times "mfvsrd " 4 } } */ /* { dg-final { scan-assembler-times "mtvsrwa " 2 } } */ /* { dg-final { scan-assembler-times "mtvsrwz " 2 } } */