From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EB96A3858C1F; Sat, 19 Aug 2023 22:03:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB96A3858C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692482604; bh=sS/aPphf5lsp3zyM8dc37FacpQeIc+DHqfXGj9yGHNQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mI3xlC/pSb6q7UvJSqsTWLpKC+QNOmDTYVlrXCDVluZyCZsFK5NGVmjxKHZtJiuND RRZkOvy5XQC6Y14+Yy6F8cSHtm46FmGclY1K/MWQkcESs1nye23167FZYCWfTvrANt /Gf/1oShuOrtiS1traYVYYd8GTv/xAYjqn2+UNe0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106677] Abstraction overhead with std::views::join Date: Sat, 19 Aug 2023 22:03:24 +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: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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 #3 from Andrew Pinski --- On the trunk we now get: _25 =3D SR.116_117 =3D=3D 0; _27 =3D (unsigned char) _25; _32 =3D _27 | SR.116_117; Rather than: _119 =3D MAX_EXPR <1, SR.115_117>; But we should instead just get: SR.116_117 | 1 Though that should still be transformed into 1 (will fix that seperately). I have a quick patch which fixes that, we need to move `a ? zero_one_value : zero_one_value` part of match.pd below the min/max detection.=