From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 23EC73858C98; Sat, 2 Dec 2023 13:20:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23EC73858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701523247; bh=XvY2Tj7VqfdDJw2yrDzv7+iN6XLVgNigzxMBz+HD70A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TW0HlHZJiNcbJSx6OJ6Su06OFPTyKD87rAMvjYu2d24D35XiQwuQtxPsJjWmhNUp1 dDaRMzbd9tdlUql1vXDf42P+6obQtiOp7IyMIHW7kQvZRh3IEi4kSLwrR0nER8Eoys eUbSKMQtx08MFkF3ziF/vd2qmuu4gsR3we2lD8JE= From: "elrodc at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112824] Stack spills and vector splitting with vector builtins Date: Sat, 02 Dec 2023 13:20:46 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: elrodc at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D112824 --- Comment #1 from Chris Elrod --- Here I have added a godbolt example where I manually unroll the array, where GCC generates excellent code https://godbolt.org/z/sd4bhGW7e I'm not sure it is 100% optimal, but with an inner Dual size of `7`, on Skylake-X it is 38 uops for unrolled GCC with separate struct fields, vs 49 uops for Clang, vs 67 for GCC with arrays. uica expects <14 clock cycles for the manually unrolled vs >23 for the array version. My experience so far with expression templates has born this out: compilers seem to struggle with peeling away abstractions.=