From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B96823B2F42D; Wed, 17 Jun 2020 21:58:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B96823B2F42D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592431103; bh=683RTQpKB6Ax/bomsAqub0NoC0qYG/Jq9FlLWLfvJ2g=; h=From:To:Subject:Date:From; b=wVH/7Opkc5cSrl3QQlr5f36TLF280zGnCzUstsR+lcXpFg7A/TStEDLWwiQdGAs0e z9ylTXeSqvaLFEBOrFbo8HPb9gf5fmIG1m+L9rJ45Hl5LQI6bBRRb7R0bKp1aKkrbt 5T7OzDIzj+WxXJTlI5WaF2uxcOMz6mry4X32Jams= From: "gabravier at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/95731] New: Faiilure to optimize a >= 0 && b >= 0 to (a | b) >= 0 Date: Wed, 17 Jun 2020 21:58:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gabravier at gmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 21:58:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95731 Bug ID: 95731 Summary: Faiilure to optimize a >=3D 0 && b >=3D 0 to (a | b) >= =3D 0 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: gabravier at gmail dot com Target Milestone: --- bool f(int a, int b) { return a >=3D 0 && b >=3D 0; } This can be optimized to `return (a | b) >=3D 0;`. LLVM does this transform= ation, but GCC does not.=