This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix PR24262


Hi,

This patch fixes a typo that disabled the check for invariance.
Bootstrapped and tested on amd64-linux, committed to mainline.

	* tree-data-ref.c (analyze_offset_expr): Check that init is invariant
	in loop all the time.

Index: tree-data-ref.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-data-ref.c,v
retrieving revision 2.44
diff -d -u -p -r2.44 tree-data-ref.c
--- tree-data-ref.c	22 Sep 2005 00:42:28 -0000	2.44
+++ tree-data-ref.c	13 Oct 2005 11:43:00 -0000
@@ -1124,7 +1124,7 @@ analyze_offset_expr (tree expr, 
 	return false;
 
       init = initial_condition_in_loop_num (access_fn, loop->num);
-      if (init == expr && !expr_invariant_in_loop_p (loop, init))
+      if (!expr_invariant_in_loop_p (loop, init))
 	/* Not enough information: may be not loop invariant.  
 	   E.g., for a[b[i]], we get a[D], where D=b[i]. EXPR is D, its 
 	   initial_condition is D, but it depends on i - loop's induction


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]