From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 861 invoked by alias); 2 Jul 2006 13:39:13 -0000 Received: (qmail 826 invoked by alias); 2 Jul 2006 13:39:06 -0000 Date: Sun, 02 Jul 2006 13:39:00 -0000 Message-ID: <20060702133906.825.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/27770] [4.2 Regression] wrong code in spec tests for -ftree-vectorize -maltivec In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "richard at codesourcery dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg00036.txt.bz2 List-Id: ------- Comment #18 from richard at codesourcery dot com 2006-07-02 13:39 ------- Subject: Re: [4.2 Regression] wrong code in spec tests for -ftree-vectorize -maltivec "hubicka at gcc dot gnu dot org" writes: > Increasing alignment of static variable during tree optimization should be as > easy as increasing the DECL_ALIGN. All variables are output after all > functions. This is what already happens. The problem is _when_ it happens. In the testcase, we first compile a simple function that has no vectorisable parts. The function accesses a variable and we decide to use section anchors to address it. We therefore place the variable in the section based on its current DECL_ALIGN. We then compile a different function that has vectorisable accesses to the same variable. We increase the variable's DECL_ALIGN accordingly. This new DECL_ALIGN throws off the assumptions made for the first function. The fix we've agreed is best in principle is to speculatively increase the DECL_ALIGN of vectorisable variables before compiling functions. Dorit says that there is a patch related to this on the autovect branch, which I'll look at when I get back from Ottawa. Richard -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27770