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 073403858D28 for ; Fri, 7 Jan 2022 20:32:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 073403858D28 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 207JbSSm022754; Fri, 7 Jan 2022 20:32:18 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3de5br0jug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Jan 2022 20:32:18 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 207KU0mL022053; Fri, 7 Jan 2022 20:32:18 GMT Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 3de5br0ju7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Jan 2022 20:32:18 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 207KQoJv016019; Fri, 7 Jan 2022 20:32:17 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma04dal.us.ibm.com with ESMTP id 3de53mmkqa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Jan 2022 20:32:17 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 207KWGUq29688300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 7 Jan 2022 20:32:16 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1626ABE07F; Fri, 7 Jan 2022 20:32:16 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7580FBE079; Fri, 7 Jan 2022 20:32:15 +0000 (GMT) Received: from li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com (unknown [9.160.35.13]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTPS; Fri, 7 Jan 2022 20:32:15 +0000 (GMT) Date: Fri, 7 Jan 2022 14:32:13 -0600 From: "Paul A. Clarke" To: David Edelsohn Cc: Segher Boessenkool , GCC Patches Subject: Re: [PATCH] rs6000: Add Power10 optimization for _mm_blendv* Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KuMO5Y6MJBPkEK9SrhFPs2wJXTggPU7y X-Proofpoint-ORIG-GUID: SXGWNPm-qULhDq2Z7cMcBMiMfSO4H723 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-07_09,2022-01-07_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxscore=0 suspectscore=0 clxscore=1015 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201070123 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Fri, 07 Jan 2022 20:32:21 -0000 On Fri, Jan 07, 2022 at 02:15:22PM -0500, David Edelsohn wrote: > > Power10 ISA added `xxblendv*` instructions which are realized in the > > `vec_blendv` instrinsic. > > > > Use `vec_blendv` for `_mm_blendv_epi8`, `_mm_blendv_ps`, and > > `_mm_blendv_pd` compatibility intrinsics, when `_ARCH_PWR10`. > > > > Also, copy a test from i386 for testing `_mm_blendv_ps`. > > This should have come with commit ed04cf6d73e233c74c4e55c27f1cbd89ae4710e8, > > but was inadvertently omitted. > > > > 2021-10-20 Paul A. Clarke > > > > gcc > > * config/rs6000/smmintrin.h (_mm_blendv_epi8): Use vec_blendv > > when _ARCH_PWR10. > > (_mm_blendv_ps): Likewise. > > (_mm_blendv_pd): Likewise. > > > > gcc/testsuite > > * gcc.target/powerpc/sse4_1-blendvps.c: Copy from gcc.target/i386, > > adjust dg directives to suit. > > --- > > Tested on Power10 powerpc64le-linux (compiled with and without > > `-mcpu=power10`). > > > > OK for trunk? > > This is okay modulo > > > + return (__m128i) vec_blendv ((__v16qu) __A, (__v16qu) __B, (__v16qu) __mask); > > Should the above be __v16qi like x86? That does arguably match the types involved (epi8) better. Shall I change the original implementation as well (4 lines later)? > return (__m128i) vec_sel ((__v16qi) __A, (__v16qi) __B, __lmask); PC