diff mbox

merge true_dependence and canon_true_dependence

Message ID AANLkTi=gHy-m_YsXaRZfuY9ExuJ=p6PXKHZ3BUXx1LRb@mail.gmail.com
State New
Headers show

Commit Message

Steven Bosscher July 24, 2010, 12:08 p.m. UTC
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.

Comments

Diego Novillo July 24, 2010, 12:10 p.m. UTC | #1
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.
diff mbox

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