From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 535F83857811; Tue, 25 Aug 2020 05:22:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 535F83857811 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598332924; bh=SzsRCIcAkubAJ9gHpSQNB0ZrXa5l2IFlNCO/8wlRPYI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=A99VVlhAteC0kUwXFgoC+7PEvdrF3mggqfkJAmxLoG23Q56WjJAZP6OLMdXkm1fgc HtuB9fSKzh7/mJtauLtAOWyoHxuNxQLMP/Yelz5d0uS8w3RRTo8mlT4oJOTss1sxWf Zawg4fZjuEQ/1dFL2KltCA6IElS00Otd9jrwVVR8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96715] Failure to optimize copysign of variable by negated variable Date: Tue, 25 Aug 2020 05:22:04 +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: Tue, 25 Aug 2020 05:22:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96715 --- Comment #2 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:bb5e895245ebef488b63efc239f64488aef65cf1 commit r11-2832-gbb5e895245ebef488b63efc239f64488aef65cf1 Author: Jakub Jelinek Date: Tue Aug 25 07:21:26 2020 +0200 match.pd: Simplify copysign (x, -x) to -x [PR96715] The following patch implements an optimization suggested in the PR, copysign(x,-x) can be optimized into -x (even without -ffast-math, should work fine even for signed zeros and infinities or nans). 2020-08-25 Jakub Jelinek PR tree-optimization/96715 * match.pd (copysign(x,-x) -> -x): New simplification. * gcc.dg/tree-ssa/copy-sign-3.c: New test.=