From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A65893857022; Tue, 11 Oct 2022 08:42:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A65893857022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665477777; bh=9fKMbXxksEsk38yL1LkFSvO9xaY1HH9LA3v5S2DjyoM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VrHpO4p+se4IrZtSeI/QVI/j+qjYlaOc2CmDyHLd+86zmLPVCj79fh9O6aTc+MiXo 9q0HINXe3Ir5szARkWCEKHfSq6PfyoslRunCUpOZKzJq/GahSVYXzC3nj4MAWkNM97 D3m4IeC0P+AcRVaRDiZw566XtKq3qKA+RE7E09qA= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107212] [11/12/13 Regression] Wrong vectorizer code since r11-718-gc735929a2503a7d0 Date: Tue, 11 Oct 2022 08:42:57 +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: 12.2.0 X-Bugzilla-Keywords: 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: P3 X-Bugzilla-Assigned-To: unassigned 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=3D107212 --- Comment #2 from Richard Biener --- Confirmed. We vectorize the loop and that triggers full constant folding leading to the wrong result somehow. Same issue with GCC 11 when you add -ftree-vectorize or use -O3, not observ= ed with GCC 10. The reduction epilogue of the SLP reduction looks duplicate wrong.=