From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C0420385802F; Wed, 29 Mar 2023 06:33:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C0420385802F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680071629; bh=wbQUo88ds/FSS59/wWiJTi7BersC2U47GgKk4CCiWFY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Nuqw8igDUq52Pyi0z7K7IGqVKORJ1v2I0x0glB4rEuLMlWPd0Pnh3BxO7QgcDpq3V LBDSTx0ySP4Vy0ECTC2gD376ziDUbWOZ3nZJILyG+p8G/60NdI5JVPuqmsB93OtPco SRYByQC+U51EMC2sjCateOwhO/yFQVxXarcpFBIA= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109154] [13 regression] jump threading de-optimizes nested floating point comparisons Date: Wed, 29 Mar 2023 06:33:48 +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: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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 #38 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:c9954996cd647daf0ba03e34dd279b97982f671f commit r13-6923-gc9954996cd647daf0ba03e34dd279b97982f671f Author: Richard Biener Date: Tue Mar 28 15:20:22 2023 +0200 tree-optimization/109154 - improve if-conversion for vectorization With multi-argument PHIs and now doing VN on the if-converted blocks the optimization of CSEing condition and negated condition doesn't work well anymore. The following restores this a little bit for the case of a single inverted condition into a COND_EXPR where we can instead swap the COND_EXPR arms. The same optimization is already done for the case of two-argument PHIs. This avoids one comparison/mask for the testcase at hand. PR tree-optimization/109154 * tree-if-conv.cc (gen_phi_arg_condition): Handle single inverted condition specially by inverting at the caller. (gen_phi_arg_condition): Swap COND_EXPR arms if requested.=