This is the mail archive of the gcc-bugs@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]

[Bug rtl-optimization/38879] scheduler does not look for conflicting alias sets



------- Comment #3 from ubizjak at gmail dot com  2009-01-17 18:40 -------
(In reply to comment #2)
> That code is ancient, and wrong from day 1 if your analysis is correct :-)

Hm, no. The code is correct, but applies only to symbols involving ANDs.

We need somehing like this code also for the case when one of operands is
non-symbol and the other involves AND. I'm testing following patch:

--cut here--
Index: alias.c
===================================================================
--- alias.c     (revision 143461)
+++ alias.c     (working copy)
@@ -1543,6 +1543,20 @@ base_alias_check (rtx x, rtx y, enum mac
       return 0;
     }

+  if (GET_CODE (x_base) == ADDRESS || GET_CODE (y_base) == ADDRESS)
+    {
+      if (GET_CODE (x) == AND && GET_CODE (y) == AND)
+       return 1;
+      if (GET_CODE (x) == AND
+         && (GET_CODE (XEXP (x, 1)) != CONST_INT
+             || (int) GET_MODE_UNIT_SIZE (y_mode) < -INTVAL (XEXP (x, 1))))
+       return 1;
+      if (GET_CODE (y) == AND
+         && (GET_CODE (XEXP (y, 1)) != CONST_INT
+             || (int) GET_MODE_UNIT_SIZE (x_mode) < -INTVAL (XEXP (y, 1))))
+       return 1;
+    }
+
   /* If one address is a stack reference there can be no alias:
--cut here--


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38879


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