------- 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" <[EMAIL PROTECTED]> 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