From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id AC0173858D32 for ; Mon, 22 Aug 2022 15:24:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AC0173858D32 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27MDfoX0018597 for ; Mon, 22 Aug 2022 15:24:32 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j4awkb9uh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 22 Aug 2022 15:24:32 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27MFM8In010445 for ; Mon, 22 Aug 2022 15:24:28 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma06fra.de.ibm.com with ESMTP id 3j2pvj9wmh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 22 Aug 2022 15:24:28 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27MFOPr928836254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Aug 2022 15:24:25 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A74D4203F; Mon, 22 Aug 2022 15:24:25 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D70B242041; Mon, 22 Aug 2022 15:24:24 +0000 (GMT) Received: from [9.171.5.55] (unknown [9.171.5.55]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 22 Aug 2022 15:24:24 +0000 (GMT) Message-ID: Date: Mon, 22 Aug 2022 17:24:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] s390: Recognize reverse/element swap permute patterns. Content-Language: en-US To: Robin Dapp , gcc-patches@gcc.gnu.org References: <60e4c7a3-3eeb-8b5e-8ab4-ffc4b8340729@linux.ibm.com> From: Andreas Krebbel In-Reply-To: <60e4c7a3-3eeb-8b5e-8ab4-ffc4b8340729@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: vXu-AMwbTTrXzw6BDVyTi0A2__nxPVDv X-Proofpoint-ORIG-GUID: vXu-AMwbTTrXzw6BDVyTi0A2__nxPVDv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-22_09,2022-08-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 malwarescore=0 spamscore=0 impostorscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208220064 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, KAM_SHORT, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, 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 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: Mon, 22 Aug 2022 15:24:35 -0000 On 8/22/22 17:10, Robin Dapp wrote: > Hi, > > after discussing off-list, here is v2 of the patch. We now recognize if > the permutation mask only refers to the first or the second operand and > use this later when emitting vpdi. > > Regtested and bootstrapped, no regressions. > > Is it OK? > > Regards > Robin > > From 1f11a6b89c9b0ad64b480229cd4db06eaaaa887a Mon Sep 17 00:00:00 2001 > From: Robin Dapp > Date: Fri, 24 Jun 2022 15:17:08 +0200 > Subject: [PATCH v2] s390: Recognize reverse/element swap permute patterns. > > This adds functions to recognize reverse/element swap permute patterns > for vler, vster as well as vpdi and rotate. > > gcc/ChangeLog: > > * config/s390/s390.cc (expand_perm_with_vpdi): Recognize swap pattern. > (is_reverse_perm_mask): New function. > (expand_perm_with_rot): Recognize reverse pattern. > (expand_perm_with_vstbrq): New function. > (expand_perm_with_vster): Use vler/vster for element reversal on z15. > (vectorize_vec_perm_const_1): Use. > (s390_vectorize_vec_perm_const): Add expand functions. > * config/s390/vx-builtins.md: Prefer vster over vler. > > gcc/testsuite/ChangeLog: > > * gcc.target/s390/vector/vperm-rev-z14.c: New test. > * gcc.target/s390/vector/vperm-rev-z15.c: New test. > * gcc.target/s390/zvector/vec-reve-store-byte.c: Adjust test > expectation. Ok, thanks! Andreas