From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 276B83858C83; Mon, 5 Sep 2022 10:19:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 276B83858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662373175; bh=J9PKEj9eEnbALgjVAQ7U2PZdsTWj5A5z5oWHZh1SKVU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=J1CAdvhPPkUUHc1IwKts2nAnYf4mzsTK6Z8im2P0nGaBHdrEqefES/bEPBLNyF+oq Ud644dvHVEIvfX3TsBKdCKl+AFK0GZYHBjswyKEl/Z1zaLb7ZGbya0eofFTSIvqxSV tsszNfuhDUv6MpH9OuaZKehmy+X1T4FqGvtd4Vs8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106822] "Boolean-or" optimization opportunity not consistently used Date: Mon, 05 Sep 2022 10:19:34 +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: 12.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: bug_status keywords cf_reconfirmed_on everconfirmed 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 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |missed-optimization Last reconfirmed| |2022-09-05 Ever confirmed|0 |1 --- Comment #4 from Richard Biener --- Confirmed. The alignment consideration shouldn't apply in this case - the MyStruct object is either there or not. Note typedef struct { bool a[]; } MyStruct; bool f(const MyStruct *s) { return s->a[0] || s->a[1]; } would be a different story.=