From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7B0F83858039; Mon, 4 Dec 2023 03:42:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B0F83858039 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701661330; bh=7tlMLee5PKoBm72xtN1/4+jAxCZH2Og+jQX0U9Ume4E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ij2nMjmkm7QiL/jLn9A9Vkuemlnnx/oXypwSmZNd+Y4kRvK8tLEvo0HNIBxl6QR3f tqIBuihGbnyP9QpIwzlXEoFD+oMNwJnfYs/Jm1qFZARY14127OaLo/dtZvYdzyKzwY Z7QI/7UmAmYH8eMFdp3VOm2J8C+P+fN8/93ji+Fk= From: "liuhongt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112824] Stack spills and vector splitting with vector builtins Date: Mon, 04 Dec 2023 03:42:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: liuhongt at gcc dot gnu.org 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: cc 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 liuhongt at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liuhongt at gcc dot gnu.org --- Comment #4 from liuhongt at gcc dot gnu.org --- there're 2 reasons. 1. X86_TUNE_AVX512_MOVE_BY_PIECES is used for move struct but it's independ= ent of -mprefer-vector-width=3D512, manully add -mtune-ctrl=3D-mtune-ctrl=3Davx512_move_by_pieces can solve most cases. 2. There's still spills for (subreg:DF (reg: V8DF) since ix86_modes_tieable= _p return false for DF and V8DF. For 1, I guess when there's explicit -mprefer-vector-width=3D512, it should rewrite tune X86_TUNE_AVX512_MOVE_BY_PIECES and unset X86_TUNE_AVX256_OPTIMAL/X86_TUNE_AVX128_OPTIMAL For 2, according to doc, it should return false since DF can be allocated to X87 reg, but V8DF only SSE_REGS, so the fix should be using vec_select inst= ead of subreg for that case?=