From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 312F23858C66; Mon, 10 Jun 2024 07:31:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 312F23858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718004712; bh=doPVdUzI3PyWToUAHG2QEHiMdQYrNLXhxPtrBjBiEmY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fOmSiSbuRxaCasezillGPL+PRG6VmVWXISyZQBjcFxTnUQQGbjmoFr0zSGA0VtX/F K7H8DsVkcOhbgpaf1cpWgbCIG2p1EtKbNIU671jfRAs2GusOeU9J6RO9/F3TrZMlRL KY/w5NggXKeybSXIAGx1KJAc5M87LasvzWIWRb08= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115395] [15 regression] libarchive miscompiled with -O2 -march=znver2 -fno-vect-cost-model since r15-1006-gd93353e6423eca Date: Mon, 10 Jun 2024 07:31:51 +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: 15.0 X-Bugzilla-Keywords: 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: 15.0 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=3D115395 --- Comment #5 from Richard Biener --- It needs epilogue vectorization to trigger and it's the path re-using the vector accumulator from the earlier loop that goes wrong when the main vector loop is skipped. We apply the initial value adjustment to the scalar result but the continuation fails to do this and the epilogue vector epilogue expects the earlier code to have done it. IIRC we force "optimization" of this to be disabled but obviously somehow fail to do this for SLP.=