From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 685CE3858D39; Tue, 18 Apr 2023 11:25:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 685CE3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681817133; bh=pbtS2B6tENSQ/rmjCad4ONssy+S6DvRYgvQU23X4rfk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mwLemJfbVYvidAjB74aeESsvrr2XHT2Y0UezMNHZISIEXKr32QTIk9QtKFz61aJyn yBzL7SIol6pGL+i+BexX0qjbwHy8KDk87ZwLlUGrcpenvUjQC2J2kPTtOdJVx6bZEq CsjmnH1zr3rOWIDChjxOL+zl40xMaEocmxNgMQuA= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109543] Avoid using BLKmode for unions with a non-BLKmode member when possible Date: Tue, 18 Apr 2023 11:25:33 +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: 14.0 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: keywords bug_status cf_reconfirmed_on cc 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=3D109543 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2023-04-18 CC| |jamborm at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- A safe mode would have to be an integer mode supporting bitwise copying.=20 Usually SRA is responsible for selecting "register-like" types for aggregat= es but it might in this case stay away because of the union. But it really looks like a classy example SRA should handle (for example by splitting TYPE into four DImode integers - it wouldn't currently chose vectors but of course it eventually could). Can you adjust the testcase to use GCC generic vectors?=