From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 426143858D20; Fri, 5 May 2023 08:35:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 426143858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683275709; bh=6oGI7ucGJBJsYKr2PYyK9ioz7DajvINyA7WpAKXZThM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Cf8ZgHeGS7ePcwXBGhlO3GJdwVsRvw4SlcX/fJ3Bch6RQxjrMhf+qMslitUH1bHgC WwZ7s2g/LAdBt9oNKWsSUw0qXtN+m0sTkbGtRyN9mJHl29uzmCpYuBDAXxHKxF0fsY hRosoJiQtj33g32Rr9QSveJuJvje7ZaKJsCApbE8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108724] [11 Regression] Poor codegen when summing two arrays without AVX or SSE Date: Fri, 05 May 2023 08:34:59 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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.4 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=3D108724 --- Comment #8 from Richard Biener --- Note that the GCC 11 branch isn't affected by what's fixed on trunk and GCC= 12, the 11 branch still uses vect_worthwhile_without_simd_p which checks vect_min_worthwhile_factor. Instead the GCC 11 branch correctly doesn't vectorize the add but instead vectorizes the stores only which results in stack spilling to build the DImode values we then store. We're also doing this in odd ways. In GCC 13/12 we have fixed this in the costing: node 0x4156628 1 times vec_construct costs 100 in prologue while the GCC 11 branch costs this as 8. Not sure where this happens in the target. Hmm, I think this happens in error.=