From patchwork Tue Oct 19 01:15:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul A. Clarke" X-Patchwork-Id: 1542965 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=IkBKgp5L; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HYG5Y5Bk8z9sPB for ; Tue, 19 Oct 2021 12:15:43 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D9423858426 for ; Tue, 19 Oct 2021 01:15:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D9423858426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1634606141; bh=T54AEmHEE4NjA7eT+AQyFNo1dphILAfDqR8yCJGMwkU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=IkBKgp5LYw+nmiYoaBQ8fYujOn166YjFOd02WKf0GrnAVsnhOAWLgDRGV5t2q3y16 gV+CiI3Oc4OFKXjUQTYAhcfOzTFubYaC6y4/gCNRoxaqiFQpwTwji3vpcSaXx4lvsF eTIUH6ST6T5NEs6f5Xodb9FPKtafDjw8V3+HvEpQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 43B233858C27 for ; Tue, 19 Oct 2021 01:15:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 43B233858C27 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19J0QfnP020035; Mon, 18 Oct 2021 21:15:19 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bsenqp6gb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Oct 2021 21:15:19 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19J1C1gg005408; Tue, 19 Oct 2021 01:15:18 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma01dal.us.ibm.com with ESMTP id 3bqpcbcubm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 01:15:18 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19J1FHi18847704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Oct 2021 01:15:17 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 42B18136081; Tue, 19 Oct 2021 01:15:17 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F2830136088; Tue, 19 Oct 2021 01:15:16 +0000 (GMT) Received: from localhost (unknown [9.160.89.189]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 19 Oct 2021 01:15:16 +0000 (GMT) To: segher@kernel.crashing.org Subject: [PATCH v4 0/3] rs6000: Support more SSE4 intrinsics Date: Mon, 18 Oct 2021 20:15:09 -0500 Message-Id: <20211019011512.100358-1-pc@us.ibm.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ig2SvVkGWFkUd2gID53EA8ZabcBf8DO1 X-Proofpoint-ORIG-GUID: ig2SvVkGWFkUd2gID53EA8ZabcBf8DO1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-18_07,2021-10-18_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 priorityscore=1501 mlxscore=0 adultscore=0 clxscore=1015 bulkscore=0 malwarescore=0 mlxlogscore=843 lowpriorityscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110190005 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_MSPIKE_H4, 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-Patchwork-Original-From: "Paul A. Clarke via Gcc-patches" From: "Paul A. Clarke" Reply-To: "Paul A. Clarke" Cc: wschmidt@linux.ibm.com, gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" v4: - Of original 6 patches in this series, I committed patches 2-5. - Found an issue from v3. New file "nmmintrin.h" also needs to be added to gcc/config.gcc "extra_headers". Unfortunately, I discovered this after committing the patch which added "nmmintrin.h", so I've added a new patch here. - Added scheduling "barriers" to patch 2 after review from Segher. - Noted additional PR fixed by patch 3. v3: Add "nmmintrin.h". _mm_cmpgt_epi64 is part of SSE4.2 and users will expect to be able to include "nmmintrin.h", even though "nmmintrin.h" just includes "smmintrin.h" where all of the SSE4.2 implementations actually appear. Only patch 5/6 changed from v2. Tested ppc64le (POWER9) and ppc64/32 (POWER7). OK for trunk? Paul A. Clarke (3): rs6000: Add nmmintrin.h to extra_headers rs6000: Support SSE4.1 "round" intrinsics rs6000: Guard some x86 intrinsics implementations gcc/config.gcc | 1 + gcc/config/rs6000/emmintrin.h | 12 +- gcc/config/rs6000/pmmintrin.h | 4 + gcc/config/rs6000/smmintrin.h | 296 ++++++++++++++---- gcc/config/rs6000/tmmintrin.h | 12 + .../gcc.target/powerpc/sse4_1-round3.h | 81 +++++ .../gcc.target/powerpc/sse4_1-roundpd.c | 143 +++++++++ .../gcc.target/powerpc/sse4_1-roundps.c | 98 ++++++ .../gcc.target/powerpc/sse4_1-roundsd.c | 256 +++++++++++++++ .../gcc.target/powerpc/sse4_1-roundss.c | 208 ++++++++++++ .../gcc.target/powerpc/sse4_2-pcmpgtq.c | 4 +- 11 files changed, 1039 insertions(+), 76 deletions(-) create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-round3.h create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-roundpd.c create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-roundps.c create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-roundsd.c create mode 100644 gcc/testsuite/gcc.target/powerpc/sse4_1-roundss.c