From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A87F4385841E; Fri, 4 Nov 2022 11:39:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A87F4385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667561959; bh=JaeG/qDoZBM5C1RuNELm/t6Dyw0y91eXp88ZNniLJYU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sPc+aKVniyZOQmjch2a02GiS1MjIDtd6YOrw/8Gyq+iVEFJN5yNfhjROXGKBS+j9l bqLU+cHr8qlfFwVaV/LCXzqVxjhFqGfgi+F2O+GrJi69EgHjIEJlgUICYSqGRnM3WQ yHsAypl1SAFWT2EMMdtgl5tFxADL2IG+wbeDcu3Q= From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55157] Missed VRP with != 0 and multiply Date: Fri, 04 Nov 2022 11:39:19 +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: 4.8.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: aldyh 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=3D55157 --- Comment #5 from Aldy Hernandez --- (In reply to Aldy Hernandez from comment #4) > + // Reflect the mask as a simple range. For example, a mask of > + // 0xff00 could be represented as [0,0][0x100, 0xffff]. > + if (TYPE_UNSIGNED (type ()) && prec > 1) Bonus points for making it work with signed. I'm not smart enough to do th= at :).=