From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 759A53858C20; Sat, 3 Sep 2022 22:55:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 759A53858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662245753; bh=mAtjRiLgensytsJsar5ZAfsi0SJExIV21FXUySvR9QY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AKSBAq1MfD7c1dRlgAWbkk5KtRfK7eguwztW+HO/ajEQv9kDtGahmBXbY6Z8bti7c ykwKtcv+sctTqqwegWHkeEI2ZTy5bwyxMTkJ9bi2GUybqxRNUfYW8udC+cGc4K5IVt zqDpyUWInLbtqOoEnRZeIrV3wouVPGouVnB8CCPk= From: "benjamin.meier70 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106822] "Boolean-or" optimization opportunity not consistently used Date: Sat, 03 Sep 2022 22:55:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: benjamin.meier70 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: 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=3D106822 --- Comment #1 from Benjamin B. Meier -= -- It might also be worth to note that the following code always compiles with= out any jumps: -------------------------------- bool f2(const MyStruct *s) { return s->a | s ->b; } -------------------------------- Given that f and f2 should behave identical, I would assume that the optimi= zed code of them is similar "good" (e.g. does not contain any jumps)=