From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D00103858017; Wed, 11 Oct 2023 13:47:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D00103858017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697032058; bh=3f8YcXA4tCPaoZsSpN5gnl6jyIKIHWw0sHd/F0IBv7E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FQqwFS5UMk1RHWSEVvCAMKdBcAGLDAifffzFCoXTCBxNH4UJm+CsXRrdcMPiLddkm O4ScUCsIxemJD1h4LixGYBAFOfS9gcF3DdBgqk++99JjSchlQTqkMuz+yJaMJ7cdUu tWFLGSDGW2qMF0COjm/XF1UVCcIWGKhpa/1OKx0s= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111764] [11/12/13/14 Regression] Wrong code at -O3 on x86_64-linux-gnu Date: Wed, 11 Oct 2023 13:47:38 +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: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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=3D111764 --- Comment #4 from Richard Biener --- /* Try to simplify the vector initialization by applying an adjustment after the reduction has been performed. */ if (!reduc_info->reused_accumulator && STMT_VINFO_DEF_TYPE (stmt_info) =3D=3D vect_reduction_= def && !operand_equal_p (neutral_op, initial_def)) { STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT (reduc_info) =3D initial_def; initial_def =3D neutral_op; } maybe just allow PLUS/MINUS_EXPR here. Maybe it's all premature ...=