From patchwork Mon Mar 28 16:28:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 52420 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BA5FA3858036 for ; Mon, 28 Mar 2022 16:28:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA5FA3858036 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1648484919; bh=gzTkSL4YQXPl+YCUq2utDRBOeRryk1qriCPoaAtYD2k=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=bmBvSj393WnwPHbMuisDA/iQNKS+5AJhV6lYny8rdf22Zl4tuJ8NVkoOsO7tYJy36 68en0Yy6yqRRhinpb0Y1MSSF/LZr3aX2GYdahgGY6IjObKYX9TnVDO41sf7Jd6/cRE Edr1YRKmkuTCNxfOnc7HSafYT9seE//eVwUCzKL8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 661B23857C4D for ; Mon, 28 Mar 2022 16:28:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 661B23857C4D Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22SFIfH6007073; Mon, 28 Mar 2022 16:28:09 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f3fj31e8v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Mar 2022 16:28:08 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 22SGE91v008244; Mon, 28 Mar 2022 16:28:08 GMT Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f3fj31e8f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Mar 2022 16:28:08 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 22SGHMkH003604; Mon, 28 Mar 2022 16:28:07 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma03wdc.us.ibm.com with ESMTP id 3f1tf9efy4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Mar 2022 16:28:07 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22SGS6P333816966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Mar 2022 16:28:06 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 243B86A054; Mon, 28 Mar 2022 16:28:06 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A0D8B6A047; Mon, 28 Mar 2022 16:28:05 +0000 (GMT) Received: from toto.the-meissners.org (unknown [9.65.244.27]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTPS; Mon, 28 Mar 2022 16:28:05 +0000 (GMT) Date: Mon, 28 Mar 2022 12:28:04 -0400 To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Peter Bergner , Will Schmidt Subject: [PATCH 3/4] Make vsx_extract_ use correct insn attributes, PR target 99293. Message-ID: Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Peter Bergner , Will Schmidt References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 5IfdjZmyIrSpl0c9DXzAWf34P7w1_-Be X-Proofpoint-GUID: l5ehJnf48DLb8RvzVnAnZq62ZdDG7hSj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-28_07,2022-03-28_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 phishscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203280090 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Michael Meissner via Gcc-patches From: Michael Meissner Reply-To: Michael Meissner Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Make vsx_extract_ use correct insn attributes, PR target 99293. In looking at PR target/99293, I noticed that the insn "type" attribute is incorrect for the vsx_extract_ insns. In particular: 1) Simple vector register move should be vecmove (alternative 1); 2) Xxpermdi should be vecperm (alternative 2); (and) 3) Mfvsrld should be mfvsr (alternative 4). This patch fixes those attributes. I have built the spec 2017 benchmark with this patch (#3) and the previous patch (#2), along with the first patch in the series for power9 and power10 targets. Most of the floating point benchmarks changed code slightly, due to the scheduling changes that came from changing the insn type attribute. I ran the spec 2017 suite on power9, and I did not not notice any significant changes from these changes. The power9 benchmarks that had code differences with these 2 patches applied in addition to the build with just the first patch applied were: namd_r, pareset_r, povray_r, wrf_r, blender_r, cam4_r, deepsjeng_r, imagick_r, roms_r The power9 benchmarks that had code differences with these 2 patches applied in addition to the build with just the first patch applied were (cactuBSSN_r had changes for power10 but not power9): cactuBSSN_r, namd_r, pareset_r, povray_r, wrf_r, blender_r, cam4_r, deepsjeng_r, imagick_r, nab_r, roms_r I have built bootstrap versions on the following systems. There were no regressions in the runs: Power9 little endian, --with-cpu=power9 Power10 little endian, --with-cpu=power10 Power8 big endian, --with-cpu=power8 (both 32-bit & 64-bit tests) Can I install this into the trunk? After a burn-in period, can I backport and install this into GCC 11 and GCC 10 branches? 2022-03-28 Michael Meissner gcc/ PR target/99293 * config/rs6000/rs6000.md (vsx_extract_): Use the correct insn type for the alternatives. --- gcc/config/rs6000/vsx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index ad722cff70f..2a23807c2dc 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -3451,7 +3451,7 @@ (define_insn "vsx_extract_" else gcc_unreachable (); } - [(set_attr "type" "veclogical,mfvsr,mfvsr,vecperm") + [(set_attr "type" "vecmove,vecperm,mfvsr,mfvsr") (set_attr "isa" "*,*,p8v,p9v")]) ;; Optimize extracting a single scalar element from memory.