This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/27770] [4.2 Regression] wrong code in spec tests for -ftree-vectorize -maltivec
- From: "richard at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jul 2006 13:39:06 -0000
- Subject: [Bug middle-end/27770] [4.2 Regression] wrong code in spec tests for -ftree-vectorize -maltivec
- References: <bug-27770-4503@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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" <gcc-bugzilla@gcc.gnu.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