From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 31F8E385703E; Wed, 10 May 2023 18:11:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31F8E385703E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683742314; bh=Dmr6WCYLC8T0286yTlXijaCAruag3Mq7ZHsU3iHQpJk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vTbxChLarEJu3vRx6Sk0K3IBaShwEaochgctqKwEh5H+UczjYvjxxxe8SYucqkfsD D9v687NS/jHJ/f6QOgsuChjHqCVvFVzZiyh6gBxkFwSvXglFe0ZkFgLeH1Zoe5YPNq HM7lU6A4gcu2404B/45Tn4Vd+Gh1Arhv7W248GYI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107888] [12/13/14 Regression] Missed min/max transformation in phiopt due to VRP Date: Wed, 10 May 2023 18:11:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107888 --- Comment #9 from Andrew Pinski --- By the way this does show up in GCC itself. in worse_state in ipa-pure-const.cc where it does MAX of bools and for x86's internal_min_issue_delay in insn-automata.cc The below is the similar code to what is there: unsigned f(unsigned temp1, unsigned temp2) { unsigned temp, res; temp =3D temp1 & 3; res =3D temp; temp =3D temp2 & 1; if (temp > res) res =3D temp; return res; }=