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]

Re: [patch] merge true_dependence and canon_true_dependence


On Fri, Jul 23, 2010 at 4:34 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> ? ? ? ?* alias.c (true_dependence_1): New function, merged version of
>> ? ? ? ?true_dependence and canon_true_dependence.
>> ? ? ? ?(true_dependence): Simplify.
>> ? ? ? ?(canon_true_dependence): Simplify.
>>
>
> This caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45035

Should be fixed with this patch.
Bootstrapped&tested on x86_64-unknown-linux-gnu. OK?

Ciao!
Steven

	PR middle-end/45035
	* alias.c (true_dependence_1): Fix thinko in merge of old
	true_dependence and canon_true_dependence.

Index: alias.c
===================================================================
--- alias.c	(revision 162498)
+++ alias.c	(working copy)
@@ -2375,18 +2375,19 @@ true_dependence_1 (const_rtx mem, enum m
     }

   if (! x_addr)
-    x_addr = XEXP (x, 0);
-
-  if (!((GET_CODE (x_addr) == VALUE
-	 && GET_CODE (mem_addr) != VALUE
-	 && reg_mentioned_p (x_addr, mem_addr))
-	|| (GET_CODE (x_addr) != VALUE
-	    && GET_CODE (mem_addr) == VALUE
-	    && reg_mentioned_p (mem_addr, x_addr))))
     {
-      x_addr = get_addr (x_addr);
-      if (!mem_canonicalized)
-	mem_addr = get_addr (mem_addr);
+      x_addr = XEXP (x, 0);
+      if (!((GET_CODE (x_addr) == VALUE
+	     && GET_CODE (mem_addr) != VALUE
+	     && reg_mentioned_p (x_addr, mem_addr))
+	    || (GET_CODE (x_addr) != VALUE
+		&& GET_CODE (mem_addr) == VALUE
+		&& reg_mentioned_p (mem_addr, x_addr))))
+	{
+	  x_addr = get_addr (x_addr);
+	  if (! mem_canonicalized)
+	    mem_addr = get_addr (mem_addr);
+	}
     }

   base = find_base_term (x_addr);


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