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 C3D1E3858D32 for ; Mon, 8 May 2023 08:01:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C3D1E3858D32 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 3487cuJM008208; Mon, 8 May 2023 08:01:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=iG0+u2G49e97/SLqIWheepGTFl5Q8HsHwuP6aMSLOMM=; b=F99W5D7yfqNvwL5ow+W4E2cJ05pL603OJDDUsZciPJ4HvV9B3LKYpmMe5ieNnqWH6Ioa nzOSrZU2m872TDPF6kc/3jgsTQdxFKq3gk2uh6DT23yc40ujn33HINfLWD3P22ZqTyd4 NHMkqE0dEHvIGWAWZWOQ+xktSJhLwxhXWUOGUepy8mjmRig1a8t4pIa6xg6bj6xugeU2 tEdzqxUNW9nipCm0Hn5Tm2KsOtkCYyfU2z0CVNcSFIjjZi+eVgcbsOTbZ0oCWaAyxRYX Na0lQoQLBz4Ym9EaOmyGEm2I2fggBACnZjSosHvqNsiwzSX+reJAxEiZwTWJUJGVHDom UQ== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qett9uerh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 May 2023 08:00:59 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3481YxVP021745; Mon, 8 May 2023 07:55:24 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3qde5fgyre-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 May 2023 07:55:24 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3487tMLM21824048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 May 2023 07:55:22 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 05AAF2004B; Mon, 8 May 2023 07:55:22 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 133B320040; Mon, 8 May 2023 07:55:20 +0000 (GMT) Received: from [9.177.84.233] (unknown [9.177.84.233]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 8 May 2023 07:55:19 +0000 (GMT) Message-ID: <84bdb3ca-bebd-2dd4-c737-29c027e45cd2@linux.ibm.com> Date: Mon, 8 May 2023 15:55:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support Content-Language: en-US To: "juzhe.zhong@rivai.ai" Cc: gcc-patches , rguenther , "richard.sandiford" References: <20230504132540.286148-1-juzhe.zhong@rivai.ai> <9638caa5-00df-1e94-2a75-2a759e60bc1e@linux.ibm.com> <6355DE1AF3A9E5D9+2023050814274173499454@rivai.ai> From: "Kewen.Lin" In-Reply-To: <6355DE1AF3A9E5D9+2023050814274173499454@rivai.ai> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: YMpsPgFewQrLT8rUg5AkuYQN0eoXuNOR X-Proofpoint-ORIG-GUID: YMpsPgFewQrLT8rUg5AkuYQN0eoXuNOR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-08_04,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 mlxlogscore=527 spamscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2305080052 X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Hi Juzhe, > Hi, Kewen. > >>> Sorry for chiming in, I had some concern here. >>> We already have some handlings for partial vector in length in vect_set_loop_controls_directly >>>(actually it deals with both mask and length), the proposed vect_set_loop_controls_by_select_vl >>>for select_vl looks like a variant for partial vector in length (comparing to the normal MIN), >>>and also adopts decrement IV. IMHO, it seems better to modify/extend the current handling in >>>vect_set_loop_controls_directly for length, or factor out the handlings for length there and >>>extend the factored one. Otherwise, it means we have two sets of handlings for partial vector >>>in lengths, it looks bad to maintain. As the previous discussion, adopting decrement IV is an >>>enhancement for loop control, it's good for both cases w/ or w/o select_vl. If the above >>>understanding is correct, the possible steps seem to be: >>> - factor out the handling for length (* optional) >>> - modify it with decrement IV >>> - extend it with select_vl. >>>In future if some RVV vendor wants to degenerate select_vl to min, it can just adopt the same >>>handlings with min by not defining select_vl optab. > > You mean like this: > doing this inside vect_set_loop_controls_directly ? >         if (use_while_len_p) >           return vect_set_loop_controls_by_while_len(...) No, I meant either factoring out those handlings for partial vector in length in function vect_set_loop_controls_directly to one separated function like: vect_set_loop_controls_directly_length and rename the existing one to vect_set_loop_controls_directly_mask, or keep the existing vect_set_loop_controls_directly for both mask and length but modify/extend the part for length. If there is no much code to share between mask and length, the former may be better. BR, Kewen