From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 17433385C6F6; Thu, 9 Nov 2023 14:20:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 17433385C6F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699539632; bh=YlAwZPTGsx63BfqJhPmxP09bjiQh0azMdzFRoyQzlb4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RoJ2LilvPKVLhb5yjL5kvUR63k72W8cXnwsxCZ57yLgN1O9DiIBeySdFvEZzwS+55 B23yLTh0tBaakcZ1UFIBrIaRJ+L09ybQBWzZ5m4X+ltmyApmD6EqNUakvy/r8iOePm Lool5PGPhj13768G8uouIxymjbunH7SXs5cQOxew= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109154] [13/14 regression] jump threading de-optimizes nested floating point comparisons Date: Thu, 09 Nov 2023 14:20:31 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tnfchris at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D109154 --- Comment #80 from CVS Commits --- The master branch has been updated by Tamar Christina : https://gcc.gnu.org/g:ed2e058c58ab064fe3a26bc4a47a5d0a47350f97 commit r14-5289-ged2e058c58ab064fe3a26bc4a47a5d0a47350f97 Author: Tamar Christina Date: Thu Nov 9 14:04:57 2023 +0000 AArch64: Handle copysign (x, -1) expansion efficiently copysign (x, -1) is effectively fneg (abs (x)) which on AArch64 can be most efficiently done by doing an OR of the signbit. The middle-end will optimize fneg (abs (x)) now to copysign as the canonical form and so this optimizes the expansion. If the target has an inclusive-OR that takes an immediate, then the transformed instruction is both shorter and faster. For those that don't, the immediate has to be separately constructed, but this still ends up being faster as the immediate construction is not on the critical path. Note that this is part of another patch series, the additional testcases are mutually dependent on the match.pd patch. As such the tests are ad= ded there insteadof here. gcc/ChangeLog: PR tree-optimization/109154 * config/aarch64/aarch64.md (copysign3): Handle copysign (x, -1). * config/aarch64/aarch64-simd.md (copysign3): Likewise. * config/aarch64/aarch64-sve.md (copysign3): Likewise.=