From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15592 invoked by alias); 20 Jun 2007 16:57:59 -0000 Received: (qmail 15543 invoked by alias); 20 Jun 2007 16:57:50 -0000 Date: Wed, 20 Jun 2007 16:57:00 -0000 Message-ID: <20070620165750.15542.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/32075] can't determine dependence between p->a[x+i] and p->a[x+i+1] where x is invariant but defined in the function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "spop at gcc dot gnu dot org" 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 X-SW-Source: 2007-06/txt/msg01737.txt.bz2 ------- Comment #3 from spop at gcc dot gnu dot org 2007-06-20 16:57 ------- Subject: Re: can't determine dependence between p->a[x+i] and p->a[x+i+1] where x is invariant but defined in the function The problem has been introduced in version 124927. @@ -3182,7 +3182,7 @@ access_functions_are_affine_or_constant_ for (i = 0; VEC_iterate (tree, fns, i, t); i++) if (!evolution_function_is_constant_p (t) - && !evolution_function_is_affine_multivariate_p (t)) + && !evolution_function_is_affine_multivariate_p (t, 0)) return false; return true; The problem is that this line is saying that t has to be an affine function with respect to the outermost loop_0. That means {x, +, 1}_2 with x defined in loop_0, will be considered as non affine, just because x is varying in loop_0. So in the above patch, we have to replace all these zeros with some other loop number... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32075