From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 783BA3898532; Wed, 6 May 2020 09:20:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 783BA3898532 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588756851; bh=STkIwBj5rwoPsau61UTHo5XGapQHJn8IzvsZVpjm/08=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ql5AmIIXHBfSY2pn096BpkNP+xQ7CzzU/KOijHXPgaEP5jS55YNYvdCl28fVU1lW2 M36QLjsezcOEvTQZUHh84h5wXZ//jAZBfYYYyFAGmyiLQCmNX2/ZeofHAgkh6f3yn5 rJqlPt80I7A1tNT/+Oex9taXH/Fg1lLaD3LU9Zs8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94921] Failure to optimize nots with sub into single add Date: Wed, 06 May 2020 09:20:51 +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: 11.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub 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, 06 May 2020 09:20:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94921 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:a7b76d574b19190da190a60c065f347f40bab59e commit r11-132-ga7b76d574b19190da190a60c065f347f40bab59e Author: Jakub Jelinek Date: Wed May 6 11:20:20 2020 +0200 match.pd: Optimize ~(~X +- Y) into (X -+ Y) [PR94921] According to my verification proglet, this transformation for signed ty= pes with undefined overflow doesn't introduce nor remove any UB cases, so should be valid even for signed integral types. Not using a for because of the :c on plus which can't be there on minus. 2020-05-06 Jakub Jelinek PR tree-optimization/94921 * match.pd (~(~X - Y) -> X + Y, ~(~X + Y) -> X - Y): New simplifications. * gcc.dg/tree-ssa/pr94921.c: New test.=