From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E29133881D29; Fri, 15 Dec 2023 12:18:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E29133881D29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702642704; bh=U3IVZE79Z4gPKqEW3U3chOhQcF5ViCGTtGMkQd6jVO0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KhdtsJ0CR1LfhWg2PmsOXLDurdHOA/VEtiQk1vWJwZa0uMPdzn5lHl3KSBn2tNRtW DyWTYwJYChxsc3p7fnGQshtZ3YDcpTwMTK0xnwCGH15dK/laTsUHJNqGGbBLpsHoGN vwRyJGNqwW36NG3RYHQwVnnOpdHgYOm7U+f3z02E= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111764] [11 Regression] Wrong code at -O3 on x86_64-linux-gnu Date: Fri, 15 Dec 2023 12:18:23 +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 #11 from GCC Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:7473b2742aa1637d14a64505e855aa09452536b1 commit r11-11143-g7473b2742aa1637d14a64505e855aa09452536b1 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.c (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)=