From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id E895739874AC for ; Fri, 4 Sep 2020 15:37:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E895739874AC Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 084FWB8Z033827; Fri, 4 Sep 2020 11:37:16 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 33bq8n2a5c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Sep 2020 11:37:16 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 084FMH4n021472; Fri, 4 Sep 2020 15:37:13 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 337en87174-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Sep 2020 15:37:13 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 084FbBOq36503960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Sep 2020 15:37:11 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 75A07A405E; Fri, 4 Sep 2020 15:37:11 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 717F2A4065; Fri, 4 Sep 2020 15:37:09 +0000 (GMT) Received: from KewenLins-MacBook-Pro.local (unknown [9.200.52.125]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 4 Sep 2020 15:37:09 +0000 (GMT) Subject: Re: [PATCH] vec: remove unreachable code To: Andrea Corallo Cc: gcc-patches@gcc.gnu.org, nd@arm.com, rguenther@suse.de, ook@ucw.cz, Richard Sandiford References: From: "Kewen.Lin" Message-ID: Date: Fri, 4 Sep 2020 23:37:07 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-04_08:2020-09-04, 2020-09-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 mlxlogscore=777 malwarescore=0 clxscore=1011 suspectscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009040133 X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, MIME_CHARSET_FARAWAY, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Fri, 04 Sep 2020 15:37:21 -0000 Hi Andrea, on 2020/9/4 ÏÂÎç8:11, Andrea Corallo wrote: > Hi all, > > just a small patch removing a piece of unreachable code in > 'vect_estimate_min_profitable_iters' given the condition > (LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo)) is always true as > checked just above. > FWIW, I had the same confusion when I saw the code at the first time, the comments at outer if "??? The "if" arm ..." and the commit messages seem to give some hints. IIUC, the code in this outer "if" was implemented to handle all cases but that time was stage 4, so it's conservative to be guarded as fully-predicated only to avoid the potential risks. I was imagining that it would finally end up by removing this outer if condition guard and the outer else. But not sure why it didn't change in the following stage1. Maybe Richard S. (the author) will have some comments. BR, Kewen