From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C4DD3858404; Tue, 11 Jul 2023 15:36:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C4DD3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689089806; bh=k1A70MBublPJMPEtBdUBfNubV08AS5TOejKlbucSbts=; h=From:To:Subject:Date:In-Reply-To:References:From; b=o6aAARHLc5kJovgvG0cKrhP1yVYERLyLS2VE/5zcF9W/m1/OD4rk71PWuHBd+Q/9J pkL7eHhXfCr8gzuaJphoImvJjsQkToN1JwyfxK/jNSZz4DMlNY8+cyL48VrXSkQNUc DKiZgaNvmALVKGYNL/tlzz+Gs61mTMUN7whrLjc8= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106884] ifcombine may move shift so it shifts more than bitwidth Date: Tue, 11 Jul 2023 15:36:45 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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=3D106884 --- Comment #5 from Andrew Pinski --- (In reply to Richard Biener from comment #4) > But yes, since we now unconditionally compute 1< GCC could assume b is in range. We are lacking a way to compute 1< optimally without that undefined behavior. phiopt will almost definitely run into a similar thing though right now, it= has not.=