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 810FE3858D37 for ; Wed, 6 Apr 2022 05:53:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 810FE3858D37 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 2364AKFP021937; Wed, 6 Apr 2022 05:53:39 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f8xe66cw0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Apr 2022 05:53:39 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 2365AVJa006521; Wed, 6 Apr 2022 05:53:38 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3f8xe66cvg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Apr 2022 05:53:38 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2365dNlh003331; Wed, 6 Apr 2022 05:53:36 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3f6drhq3sn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Apr 2022 05:53:36 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2365rXQ727525442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 6 Apr 2022 05:53:34 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D82FF5204F; Wed, 6 Apr 2022 05:53:33 +0000 (GMT) Received: from [9.200.47.76] (unknown [9.200.47.76]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1ED585204E; Wed, 6 Apr 2022 05:53:31 +0000 (GMT) Message-ID: Date: Wed, 6 Apr 2022 13:53:30 +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 v2] rs6000: Support UN[GL][ET] in rs6000_maybe_emit_maxc_minc [PR105002] Content-Language: en-US To: Segher Boessenkool Cc: GCC Patches , David Edelsohn , Peter Bergner References: <20220401144918.GE614@gate.crashing.org> From: "Kewen.Lin" In-Reply-To: <20220401144918.GE614@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: QhcRqifotspB1Zm3T7isrjMITO9ndMXW X-Proofpoint-ORIG-GUID: iHpk3OeUgucpLIjE9bUAmKm9ATedGg_3 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-04-06_01,2022-04-05_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 mlxscore=0 adultscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204060022 X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, 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-List-Received-Date: Wed, 06 Apr 2022 05:53:41 -0000 on 2022/4/1 10:49 PM, Segher Boessenkool wrote: > Hi! > > On Fri, Apr 01, 2022 at 02:27:14PM +0800, Kewen.Lin wrote: >> Commit r12-7687 exposed one miss optimization chance in function >> rs6000_maybe_emit_maxc_minc, for now it only considers comparison >> codes GE/GT/LE/LT, but it can support more variants with codes >> UNLT/UNLE/UNGT/UNGE by reversing them into the equivalent ones >> with GE/GT/LE/LT. > > You may want to add somewhere (in the comment in the code perhaps?) > that if we see e.g. UNLT it guarantees that we have 4-way condition > codes (LT/GT/EQ/UN), so we do not have to check for fast-math or the > like. This is always true of course, but it doesn't hurt to remind > the reader :-) > > The PR marker goes here: > > PR target/105002 >> * config/rs6000/rs6000.cc (rs6000_maybe_emit_maxc_minc): Support more >> comparison codes UNLT/UNLE/UNGT/UNGE. > The current daily bump seems smart and as verified with gcc-verify that it's able to add the PR marker into the (each if there are multiple) place that needs it. But anyway I updated the commit log as you suggested. :) >> - bool max_p = false; >> + bool max_p; > > Please move this to later, since you touch it anyway: > > bool max_p; >> if (code == GE || code == GT) >> max_p = true; >> else if (code == LE || code == LT) > > Okay for trunk with those finishing touches. Thanks! > Thanks for the review! Addressed the comments and committed as r12-8010. BR, Kewen