From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C2293858288; Mon, 6 Nov 2023 17:56:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C2293858288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699293393; bh=clqRZmCqqOSFoZyHyrhc2TI7sK+eaDCw/Q7e6seRkzw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JS3HVNWN3QeAe+qYH1JdayO4m5CafsJDqgL0saGQ8ZmnXx/VzFiDnm/trHqUzgd61 qidpiKnfl9b8ESZaFADT14GIzNRSVD9673At21RIN/Tz6yzHMbVj/QIlYqkT93skXR CDswYdXiAJH8cWG3cSFbTPxh6zfCwSIErs06S21s= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112324] phiopt fail to recog if (b < 0) max = MAX(-b, max); else max = MAX (b, max) into max = MAX (ABS(b), max) Date: Mon, 06 Nov 2023 17:56:33 +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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112324 --- Comment #4 from Andrew Pinski --- (In reply to Andrew Pinski from comment #3) > Note a simple patch to improve phiopt here does not improve the original > code in openjpeg. >=20 > The reason why is due to the code in phiopt here is only operates on the > case where the phi would be the only one. In that case we also have a vop > phi which changes which causes the code not to be done. But maybe ifcvt could use the same function to do the transformation before= it does the conversion ...=