From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DAF98385DC00; Wed, 22 Apr 2020 17:04:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAF98385DC00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587575051; bh=dTF6cavMtS7F6M9Ys9/ByDrPWHWBFrNmWguMVfMK3ys=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ar2iZTmWwvQin04za52RCfdG2wixm3Cy616cdXafaJ9HgOXLtLrgEvr16NyyqY/Sv J9I3/jRcIOKG4A5c5486pqFSrWzlN5MeShmCCJxta2wMqSGbDnXR9sKAG5gNqlhhz1 EQigPjW/QRecIiW/AVntXhSjs5xuggDp4n2zbuKk= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/94665] missed minmax optimization opportunity for if/else structure. Date: Wed, 22 Apr 2020 17:04:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: segher at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 17:04:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94665 --- Comment #17 from Segher Boessenkool --- [ Please don't add other email addresses for me; I get enough mail already, I don't need all bugzilla mail in duplicate :-) ] (In reply to z.zhanghaijian@huawei.com from comment #16) > Ok, I will create a new PR to track this bug, and I will submit a bugfix > patch whit that PR. You can make this PR RESOLVED again, after you made a new PR. > In addition, I tracked the process of generating fmaxnm/fminnm and found > that it was generated in phiopt (minmax_replacement) and if-conversion > (noce_try_minmax). In the rtl combine, only fminnm can be generated. Is it > necessary for us to improve this optimization in the rtl combine using the > above patch in stage1? Yeah, ifcvt will often do it. combine can handle max just fine as well; you'll need to track down why it doesn't here (I noticed it doesn't as well, it wasn't immediately obvious to me what the difference with the min case is).=