From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A7E373857C52; Thu, 1 Apr 2021 09:58:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7E373857C52 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99863] [10/11 Regression] wrong code with -O -fno-tree-forwprop -mno-sse2 Date: Thu, 01 Apr 2021 09:58:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 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 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, 01 Apr 2021 09:58:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99863 --- Comment #3 from Richard Biener --- diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 6da66985ad6..1f417a52702 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -5231,6 +5231,7 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, TREE_TYPE (ce->value= ))) TREE_STATIC (ctor) =3D 0; } + recompute_constructor_flags (ctor); if (!is_gimple_reg (TREE_OPERAND (*expr_p, 0))) TREE_OPERAND (*expr_p, 1) =3D get_formal_tmp_var (ctor, pre_p); } simplifies the IL (vector lowering was supposed to simplify the element extraction but GENERIC match.pd folding is confused about TREE_SIDE_EFFECTS on the vector CTOR). It still nicely triggers the bug though.=