From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16832 invoked by alias); 11 Dec 2013 09:21:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16806 invoked by uid 48); 11 Dec 2013 09:21:24 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/59464] Unnecessary vector register spill Date: Wed, 11 Dec 2013 09:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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: bug_status cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg00941.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59464 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-12-11 Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- struct8 (struct test_structure_8 ts) { vector(4) float vect__2.10; vector(4) float vect_ts_f1_9.9; struct test_structure_8 D.1759; ;; basic block 2, loop depth 0 ;; pred: ENTRY vect_ts_f1_9.9_15 = MEM[(struct *)&ts]; vect__2.10_17 = vect_ts_f1_9.9_15 + { 1.0e+0, 1.0e+0, 1.0e+0, 1.0e+0 }; MEM[(struct *)&D.1759] = vect__2.10_17; return D.1759; ;; succ: EXIT } OTOH the code generated is much much worse if you disable vectorization. Then we should make sure the stack slot we spill the arguments to is properly aligned so we can avoid the UNSPEC_LOADU. This eventually can lead to cleanup opportunities. Ideally we'd recognize that we can more optimally load from the argument registers into a V4SF register of course (but due to the way we do argument setup during expand this may not be easily possible). It's of course the bad ABI choice that leads to this mess ...