Patchwork merge true_dependence and canon_true_dependence

login
register
mail settings
Submitter Steven Bosscher
Date July 24, 2010, 12:08 p.m.
Message ID <AANLkTi=gHy-m_YsXaRZfuY9ExuJ=p6PXKHZ3BUXx1LRb@mail.gmail.com>
Download mbox | patch
Permalink /patch/59854/
State New
Headers show

Comments

Steven Bosscher - July 24, 2010, 12:08 p.m.
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.
Diego Novillo - July 24, 2010, 12:10 p.m.
On 10-07-24 08:08 , Steven Bosscher wrote:

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

OK.


Diego.

Patch

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);