From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 1C64D3857C4C; Tue, 21 Jul 2020 03:43:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1C64D3857C4C Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06L34AsM116067; Mon, 20 Jul 2020 23:43:33 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32d5pf9qgj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jul 2020 23:43:33 -0400 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06L35iBV120785; Mon, 20 Jul 2020 23:43:33 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 32d5pf9qg6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Jul 2020 23:43:33 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06L3gcYi005421; Tue, 21 Jul 2020 03:43:31 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma06ams.nl.ibm.com with ESMTP id 32brbh3buw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jul 2020 03:43:31 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06L3hS8t66191598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Jul 2020 03:43:28 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 91938A405F; Tue, 21 Jul 2020 03:43:28 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9A187A4060; Tue, 21 Jul 2020 03:43:26 +0000 (GMT) Received: from luoxhus-MacBook-Pro.local (unknown [9.197.236.140]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 21 Jul 2020 03:43:26 +0000 (GMT) Subject: Re: [PATCH] rs6000: Define movsf_from_si2 to extract high part SF element from DImode[PR89310] To: Segher Boessenkool Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com, wschmidt@linux.ibm.com, guojiufu@linux.ibm.com, linkw@gcc.gnu.org References: <20200707001803.GR3598@gate.crashing.org> <66c7b5d6-afa6-53d7-704d-44834ff00311@linux.ibm.com> <20200707213116.GU3598@gate.crashing.org> <66faac54-0620-5ee0-ff48-5609ad9e3fa7@linux.ibm.com> <20200708224334.GY3598@gate.crashing.org> <20200709192515.GO3598@gate.crashing.org> <472e0dc4-6fc6-8d0b-2c0c-259dccd29a89@linux.ibm.com> <20200711005438.GE30544@gate.crashing.org> <49363e95-d454-d9af-24aa-45f641da29fa@linux.ibm.com> <20200720153104.GK30544@gate.crashing.org> From: luoxhu Message-ID: <00f1d035-a686-d19b-033d-993282b7da17@linux.ibm.com> Date: Tue, 21 Jul 2020 11:43:25 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200720153104.GK30544@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-20_19:2020-07-20, 2020-07-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 mlxscore=0 phishscore=0 impostorscore=0 spamscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007210020 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2020 03:43:35 -0000 On 2020/7/20 23:31, Segher Boessenkool wrote: > On Mon, Jul 13, 2020 at 02:30:28PM +0800, luoxhu wrote: >> For extracting high part element from DImode register like: >> >> {%1:SF=unspec[r122:DI>>0x20#0] 86;clobber scratch;} >> >> split it before reload with "and mask" to avoid generating shift right >> 32 bit then shift left 32 bit. This pattern also exists in PR42475 and >> PR67741, etc. >> >> srdi 3,3,32 >> sldi 9,3,32 >> mtvsrd 1,9 >> xscvspdpn 1,1 >> >> => >> >> rldicr 3,3,0,31 >> mtvsrd 1,3 >> xscvspdpn 1,1 > >> * config/rs6000/rs6000.md (movsf_from_si2): New >> define_insn_and_split. > > (That fits on one line). > >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/powerpc/pr89310.c >> @@ -0,0 +1,17 @@ >> +/* { dg-do compile } */ >> +/* { dg-options "-O2" } */ > >> +/* { dg-final { scan-assembler-not {\msrdi\M} } } */ >> +/* { dg-final { scan-assembler-not {\msldi\M} } } */ >> +/* { dg-final { scan-assembler-times {\mrldicr\M} 1 } } */ > > I'm not sure that works on older cpus? Please test there, and add > -mdejagnu-cpu=power8 to the dg-options if needed. Also test on BE please. > > Okay for trunk with those last details taking care of. Thank you! Thanks for the remind. Addressed the comments and committed in r11-2245. Xionghu