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 B8D7F3858C2A for ; Tue, 12 Dec 2023 07:38:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B8D7F3858C2A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B8D7F3858C2A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702366731; cv=none; b=Lv5trHgaGZH/vc9Uz6WWx5Z6ZMILq2yDNkfhIXo5YmGlK3j4o7Vdg4jPOPLk1dKQOrKrkVgG76ze/RQSwDCDY4GuvA1m3Vbk5kI+mF83Uhd5lgWYfct2G4Y+WPcimR0hycx5BMlVM4P6wues1BV9oqjxI2FuTq01qElr+hTfvNw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702366731; c=relaxed/simple; bh=bGeavkS5wyr205gmpOD2re4O4502Lv9JLbyWaHKN6xM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=qzP39ol9fs0gKZuq6yH5ebeB83w6S8sh100Ea8surYhQIj2/ynOSfW/SxWkN/WT8YRzx98SYtekP5ow11KFoZb6MLmk8Gtm1lkjFW6gYXlBn9ClyNXT56y/Qk2+rCE24tkywQjqkqu50ls+FT//9rUE6RMwVE6a+S/ava60EOfA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BC73OnD017708; Tue, 12 Dec 2023 07:38:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=kRHRyPtgSBxVmJnQPUnXt5Il9mogpqaPMPRay20+fWk=; b=dBQm7HAIeK+ewsqRZ3HpgG5ej3Na1wanRa8Jv56qiktA9UXfchRKyJ3qVeErwEgfYum5 KW4b/TKHUr/7D/ZV8ald1uOf7oMC6JPr/SosuXDMR5MQUPcyYEVdU2RCIRTE7ZwD0Rgc wYqDp6j0V/w096AqGM8z56wtfOx6YnsVJx4OOvIRk8/5kooPYcjdksucJsi4qdpp7lzp ExVwvoid+U7FmQ9gV8SgoY/nGAEWL2JbR9e52/kIJqc6bD2Dt2oTHLqLO8hn8gyWgwz5 rT+VByOUCFNshgQRiDm3vdgYJELrhlcICWk1EgHiRc7p741u21c+vMEPuPr8WhA8NV/u 0w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uxjsn0yne-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 07:38:49 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BC74IH4019593; Tue, 12 Dec 2023 07:38:49 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uxjsn0ymy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 07:38:49 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BC5Z4ib028201; Tue, 12 Dec 2023 07:38:48 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([172.16.1.8]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uw2xyfhd3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 07:38:48 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BC7clpH15270470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Dec 2023 07:38:47 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F11F5805D; Tue, 12 Dec 2023 07:38:47 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6B5A658057; Tue, 12 Dec 2023 07:38:45 +0000 (GMT) Received: from [9.43.76.132] (unknown [9.43.76.132]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Dec 2023 07:38:44 +0000 (GMT) Message-ID: Date: Tue, 12 Dec 2023 13:08:43 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] rs6000: Add new pass for replacement of contiguous addresses vector load lxv with lxvp Content-Language: en-US To: "Kewen.Lin" Cc: Segher Boessenkool , David Edelsohn , Peter Bergner , Michael Meissner , GCC Patches References: <77426697-1571-e180-add9-cfb6d10f8424@linux.ibm.com> <57d3fbcb-98b6-4658-8d08-e30f8c68a18c@linux.ibm.com> <11198028-5b04-4ebd-9374-a78dc85376a8@linux.ibm.com> <5467f44c-7b16-444d-a292-8da237f7a9f5@linux.ibm.com> <75bdc1fc-23c9-4ca2-a338-fc1328319114@linux.ibm.com> <8d07e569-5f58-1193-920e-7440f3590397@linux.ibm.com> From: Ajit Agarwal In-Reply-To: <8d07e569-5f58-1193-920e-7440f3590397@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Ii87iWnXZb9fXIMcYTi6EqbhUMfELzXJ X-Proofpoint-ORIG-GUID: a1QHP7T5naM3IjXoKYrBaH5YVUr2oMAm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-12_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 impostorscore=0 mlxscore=0 bulkscore=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=920 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312120059 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello Kewen: On 12/12/23 11:58 am, Kewen.Lin wrote: > Hi Ajit, > > on 2023/12/8 16:01, Ajit Agarwal wrote: >> Hello Kewen: >> > > [snip...] > >> With UNSPEC_MMA_EXTRACT I could generate the register pair but functionally here is the >> below code which is incorrect. >> >> l lxvp %vs0,0(%r4) >> xxlor %vs32,%vs0,%vs0 >> xvf32ger 0,%vs34,%vs32 >> xvf32gerpp 0,%vs34,%vs33 >> xxmfacc 0 >> stxvp %vs2,0(%r3) >> stxvp %vs0,32(%r3) >> blr >> >> >> Here is the RTL Code: >> >> (insn 19 4 20 2 (set (reg:OO 124 [ *ptr_4(D) ]) >> (mem:OO (reg/v/f:DI 122 [ ptr ]) [0 *ptr_4(D)+0 S16 A128])) -1 >> (nil)) >> (insn 20 19 9 2 (set (reg:V16QI 129 [orig:124 *ptr_4(D) ] [124]) >> (subreg:V16QI (reg:OO 124 [ *ptr_4(D) ]) 0)) -1 >> (nil)) >> (insn 9 20 11 2 (set (reg:XO 119 [ _7 ]) >> (unspec:XO [ >> (reg/v:V16QI 123 [ src ]) >> (reg:V16QI 129 [orig:124 *ptr_4(D) ] [124]) >> ] UNSPEC_MMA_XVF32GER)) 2195 {mma_xvf32ger} >> (expr_list:REG_DEAD (reg:OO 124 [ *ptr_4(D) ]) >> (nil))) >> (insn 11 9 12 2 (set (reg:XO 120 [ _9 ]) >> (unspec:XO [ >> (reg:XO 119 [ _7 ]) >> (reg/v:V16QI 123 [ src ]) >> (reg:V16QI 125 [ MEM[(__vector unsigned char *)ptr_4(D) + 16B] ]) >> ] UNSPEC_MMA_XVF32GERPP)) 2209 {mma_xvf32gerpp} >> (expr_list:REG_DEAD (reg:V16QI 125 [ MEM[(__vector unsigned char *)ptr_4(D) + 16B] ]) >> (expr_list:REG_DEAD (reg/v:V16QI 123 [ src ]) >> (expr_list:REG_DEAD (reg:XO 119 [ _7 ]) >> (nil))))) >> (insn 12 11 18 2 (set (mem:XO (reg:DI 126) [1 *dst_10(D)+0 S64 A128]) >> (reg:XO 120 [ _9 ])) "../gcc/testsuite/g++.target/powerpc/vecload.C":13:8 2182 {*movxo} >> (expr_list:REG_DEAD (reg:DI 126) >> (expr_list:REG_DEAD (reg:XO 120 [ _9 ]) >> (nil)))) >> (note 18 12 0 NOTE_INSN_DELETED) >> >> r124 and r129 conflicts live range amd ira generates different registers which will not >> serve our purpose. >> >> Making r124 and r129 as same will not allocate register by ira as r124 could have both OOmode >> and V16QImode. >> >> Doing this pass before ira_pass has such above issues and we could solve them after making >> after reload pass. > > Could you also attach your latest WIP patch? I'm going to look into the extra move issue with it. > I have fixed the register allocator IRA pass to generate the register pair and with that no extra move is also generated and now with the fix the code is generated with register pair. Earlier you have the idea to use SUBREG V16QI (reg: OOmode 124) at the use that also doesn't generate the register pair. I had to make changes in IRA pass register allocator to generate register pair and no extra moves are also not generated. I am testing the fix and would send for code review very soon. Thanks for the help and suggestions. Thanks & Regards Ajit > Thanks! > > BR, > Kewen