From patchwork Fri Jan 14 13:06:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 50033 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 BD3F93836007 for ; Fri, 14 Jan 2022 13:07:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD3F93836007 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1642165666; bh=o3Qh3dzdCym4/leMEFg1J+I0HVYzMDCeaPGLURsDxAU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=hkqwf+KSGhnMEuZjEvnkVRCN/RjN0AUlLr1ggNASaP4DLVaVyIpnz/imuffNgIoY/ MAHOyRoqlyKEl49TFrvIP6WCYIWcOmJgjrsGUm+Ue9Z69OJWM5szDH6pdxzuOUR3yk nWmCPCV8P23+ZeBfPVJMUNcGgDYExnrkeCzIB8ek= 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 3026D3858D35 for ; Fri, 14 Jan 2022 13:07:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3026D3858D35 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 20EBRfMX007289; Fri, 14 Jan 2022 13:07:04 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dk8at1qay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jan 2022 13:07:04 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20ED71M3026791; Fri, 14 Jan 2022 13:07:01 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma01fra.de.ibm.com with ESMTP id 3dfwhjxrd8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jan 2022 13:07:01 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20ED6xX948496976 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jan 2022 13:06:59 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 83D84AE053; Fri, 14 Jan 2022 13:06:59 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 14DD6AE059; Fri, 14 Jan 2022 13:06:58 +0000 (GMT) Received: from KewenLins-MacBook-Pro.local (unknown [9.200.35.153]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Jan 2022 13:06:57 +0000 (GMT) To: GCC Patches Subject: [committed] vect: Check partial vector param for supports_partial_vectors [PR104015] Message-ID: <43967e6c-9a08-7b77-ad04-f3e801fca17b@linux.ibm.com> Date: Fri, 14 Jan 2022 21:06:56 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-GUID: HK4qdpt5EQaC4ZeAYkeWeUJxunlSRbgT X-Proofpoint-ORIG-GUID: HK4qdpt5EQaC4ZeAYkeWeUJxunlSRbgT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-14_04,2022-01-14_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 malwarescore=0 clxscore=1011 bulkscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201140088 X-Spam-Status: No, score=-11.8 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 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: "Kewen.Lin via Gcc-patches" From: "Kewen.Lin" Reply-To: "Kewen.Lin" Cc: Richard Sandiford Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi, As described in PR104015, the function partial_vectors_supported_p mainly checks optabs for partial vectors support query, but we still have one parameter param_vect_partial_vector_usage to control the capability. Power9 introduces vector with length instructions (for len_load/len_store) but we don't enable partial vector on it by default. It should be considered as not supporting partial vector by default. This fix is to make the flag supports_partial_vectors check param_vect_partial_vector_usage accordingly. This was approved by Richard in the PR, thanks Richard and Andre for the comments, pushed via r12-6582. BR, Kewen ----- gcc/ChangeLog: PR tree-optimization/104015 * tree-vect-loop.c (vect_analyze_loop): Check param_vect_partial_vector_usage for supports_partial_vectors. diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index ba67de490bb..49d53fb3383 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -3026,7 +3026,8 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared) vector_modes[0] = autodetected_vector_mode; mode_i = 0; - bool supports_partial_vectors = partial_vectors_supported_p (); + bool supports_partial_vectors = + partial_vectors_supported_p () && param_vect_partial_vector_usage != 0; poly_uint64 first_vinfo_vf = LOOP_VINFO_VECT_FACTOR (first_loop_vinfo); while (1)