From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 339323857B8A; Mon, 27 Nov 2023 13:09:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 339323857B8A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701090589; bh=XLY5gDubOP7fhQqwdBT4hjHMas5cP461WYm9O7Q11Ic=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Uu/PSpHz0xTN1xLWokCOMSkDAwMyv7EXKQB5+jpakGcTcPdiVZllNtnlb0tvKTNMn rpdtzyiWO1IGQUVNOyq4BC51XuASGHN49qz21rvyqLShpqLGXHH3UjKlamTcmPFW9a OT+h9Tpa9xcezs0C8qkQmUumgTJzrDK6gMl4sVYA= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111764] [11/12 Regression] Wrong code at -O3 on x86_64-linux-gnu Date: Mon, 27 Nov 2023 13:09:48 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 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 #10 from GCC Commits --- The releases/gcc-12 branch has been updated by Richard Biener : https://gcc.gnu.org/g:bd75062cc3fc4abd19c37fae164d9764ffab2407 commit r12-10012-gbd75062cc3fc4abd19c37fae164d9764ffab2407 Author: Richard Biener Date: Thu Oct 12 09:09:46 2023 +0200 tree-optimization/111764 - wrong reduction vectorization The following removes a misguided attempt to allow x + x in a reduction path, also allowing x * x which isn't valid. x + x actually never arrives this way but instead is canonicalized to 2 * x. This makes reduction path handling consistent with how we handle the single-stmt reduction case. PR tree-optimization/111764 * tree-vect-loop.cc (check_reduction_path): Remove the attempt to allow x + x via special-casing of assigns. * gcc.dg/vect/pr111764.c: New testcase. (cherry picked from commit 05f98310b54da95e468d799f4a910174320cccbb)=