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 0572A3858C20 for ; Thu, 14 Sep 2023 03:12:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0572A3858C20 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 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 38E36uSD011992; Thu, 14 Sep 2023 03:12:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=Jq4skqPQ/HoukFiCZJkFvTLenLfzbFdUgxB7FLfjywk=; b=fQlW25kppTPB300r86xeLEHcsgWrRhfCydtwGJTL2lnS4899J8TeTd9ILOa25OJ4/gVd kALrmj40aryn/vpPGaSVh/mfFBFHxzqZR80U7r/7qNKNfUHZdNIdJPzosCX2bS93DT6E VWZNIjwiXd/4eRLOyT7qlCw1Vg/ZBSTlyv4KggyLJ5r5wtOkYNdNxonV7m1POFeo/b96 Bk4lZ/x+Yow05N7Xmvyn0BBfB2rBUecA6cTJCllj7nc1MmZUYRMDjm+Ql3PsUS2gYTkb XoNwp7LwAY7/6MVngTV1Q7An0CTY2Yj7xVGderjpUSh5rY6BDkPOUomJmecoJhEjsnle ig== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t3rabj97e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 03:12:05 +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 38E378LO014541; Thu, 14 Sep 2023 03:12:04 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t3rabj976-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 03:12:04 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38E2Htam023099; Thu, 14 Sep 2023 03:12:03 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3t141nyukd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 03:12:03 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38E3C1dO18612750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Sep 2023 03:12:01 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 920382004E; Thu, 14 Sep 2023 03:12:01 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8178320049; Thu, 14 Sep 2023 03:12:00 +0000 (GMT) Received: from trout.aus.stglabs.ibm.com (unknown [9.40.194.100]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 14 Sep 2023 03:12:00 +0000 (GMT) From: Kewen Lin To: gcc-patches@gcc.gnu.org Cc: richard.guenther@gmail.com, richard.sandiford@arm.com, segher@kernel.crashing.org, bergner@linux.ibm.com Subject: [PATCH 00/10] vect: Move costing next to the transform for vect store Date: Wed, 13 Sep 2023 22:11:49 -0500 Message-Id: X-Mailer: git-send-email 2.31.1 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: wq9Dklgo3RUJQPdVdZAxcGBMli5kZ24w X-Proofpoint-ORIG-GUID: oUBPm2-aNQRc5Sgyakl4JgmjY44vLum8 Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-13_19,2023-09-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 mlxscore=0 mlxlogscore=853 malwarescore=0 bulkscore=0 priorityscore=1501 clxscore=1011 phishscore=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309140025 X-Spam-Status: No, score=-6.3 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_PASS,TXREP 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: This patch series is a follow up for the previous patch series for vector load [1]. Some of associated test cases show the benefits of this kind of structuring. Like the one on vect load, this patch series makes costing not call function vect_model_store_cost any more but next to the transform. Most of them are organized according to the memory access types of vector store, hope it can make the review and bisection easy. The changes just follow the handlings in the function vect_model_store_cost first, then refine a bit by referring to the transform code, I also checked them with some typical test cases to verify. The whole series can be bootstrapped and regtested incrementally on: - x86_64-redhat-linux - aarch64-linux-gnu - powerpc64-linux-gnu P7, P8 and P9 - powerpc64le-linux-gnu P8, P9 and P10 By considering the current vector test buckets are mainly tested without cost model, I also verified the whole patch series was neutral for SPEC2017 int/fp on Power9 at O2, O3 and Ofast separately. [1] https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621460.html Kewen Lin (10): vect: Ensure vect store is supported for some VMAT_ELEMENTWISE case vect: Move vect_model_store_cost next to the transform in vectorizable_store vect: Adjust vectorizable_store costing on VMAT_GATHER_SCATTER vect: Simplify costing on vectorizable_scan_store vect: Adjust vectorizable_store costing on VMAT_ELEMENTWISE and VMAT_STRIDED_SLP vect: Adjust vectorizable_store costing on VMAT_LOAD_STORE_LANES vect: Adjust vectorizable_store costing on VMAT_CONTIGUOUS_PERMUTE aarch64: Don't use CEIL for vector_store in aarch64_stp_sequence_cost vect: Get rid of vect_model_store_cost vect: Consider vec_perm costing for VMAT_CONTIGUOUS_REVERSE gcc/config/aarch64/aarch64.cc | 2 +- .../costmodel/ppc/costmodel-vect-store-1.c | 23 + .../costmodel/ppc/costmodel-vect-store-2.c | 29 + gcc/tree-vect-stmts.cc | 717 +++++++++++------- 4 files changed, 493 insertions(+), 278 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-store-1.c create mode 100644 gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-store-2.c -- 2.31.1