From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B9206393C8A4; Thu, 18 Jun 2020 08:41:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9206393C8A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592469679; bh=S4OY6ZsbkoI2uBL4yky0fDcWAJeWTBZrCGwpksgk694=; h=From:To:Subject:Date:In-Reply-To:References:From; b=g4HyWYlwzHgn7TZCq6ZEF0R4aght8cDWhYkYsPi2V+Bz+9JggAtADl0z+i6o9weYD 47AKIjev5wM5tXcVMYWFo76yZ1l4TGv/xGRo+7rTjYJhTkitxz1LrBsDRiCiQ+y9jj zts8DuiyRWzFI3lbJwjszwhCllN+AJCRr0yDLnZo= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/95731] Faiilure to optimize a >= 0 && b >= 0 to (a | b) >= 0 Date: Thu, 18 Jun 2020 08:41: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: 11.0 X-Bugzilla-Keywords: easyhack, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: keywords 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 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: Thu, 18 Jun 2020 08:41:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95731 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |easyhack, | |missed-optimization --- Comment #1 from Richard Biener --- Confirmed. Two pieces depending on SHORT_CIRCUIT_... maybe_fold_and_comparisons for ifcombine and a match.pd pattern for _1 =3D a_3(D) >=3D 0; _2 =3D b_4(D) >=3D 0; _5 =3D _1 & _2; that should also make it work through maybe_fold_and_comparisons. We have something like this in fold-const.c btw.=