From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BA0DE3858413; Fri, 25 Aug 2023 18:34:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA0DE3858413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692988460; bh=q9etR5n0Wy++OZFPV9Y+9hs+1a/nIfJZxSFh7uPZ+hU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GSjWrbKMZAMh0wVKNiTzU5A1mWjwKddICgKVgKLCHlhrIOo4yZ1lLyDASIj2KfbHU vVyrq37p9getyjnn3YiZiw46iptEojda8lRkd1AanQTjsz6G2jIk++ylI4Z4cQbI4q 1XNkB8ARFlp+sx/P/pM1Qky87tO5HVLQzs0UO7mo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106677] Abstraction overhead with std::views::join Date: Fri, 25 Aug 2023 18:34:20 +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: enhancement 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: --- 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=3D106677 --- Comment #6 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:d9a0d692ffc6951c5670f54c3f4f17ec64a58600 commit r14-3486-gd9a0d692ffc6951c5670f54c3f4f17ec64a58600 Author: Andrew Pinski Date: Sat Aug 19 15:30:45 2023 -0700 MATCH: Move `a ? one_zero : one_zero` matching after min/max matching In PR 106677, I noticed that on the trunk we were producing: ``` _25 =3D SR.116_117 =3D=3D 0; _27 =3D (unsigned char) _25; _32 =3D _27 | SR.116_117; ``` From `SR.115_117 !=3D 0 ? SR.115_117 : 1` Rather than: ``` _119 =3D MAX_EXPR <1, SR.115_117>; ``` Or (rather) ``` _119 =3D SR.115_117 | 1; ``` Due to the order of the patterns. Committed as approved with the new comment and testcase. Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * match.pd (`a ? one_zero : one_zero`): Move below detection of minmax. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/phi-opt-34.c: New test.=