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

--- Comment #3 from Michael Matz <matz at gcc dot gnu.org> ---
It's cse, and it's because it indeed uses the wrong dependence test.
The CSE tables holds values read from memory which are supposed to be
clobbered by following writes, i.e. write-after-read, which has to use
anti_dependence.  This fixes the testcase:

Index: cse.c
===================================================================
--- cse.c       (revision 199694)
+++ cse.c       (working copy)
@@ -1837,7 +1837,7 @@ check_dependence (rtx *x, void *data)
 {
   struct check_dependence_data *d = (struct check_dependence_data *) data;
   if (*x && MEM_P (*x))
-    return canon_true_dependence (d->exp, d->mode, d->addr, *x, NULL_RTX);
+    return anti_dependence (*x, d->exp);
   else
     return 0;
 }

Reply via email to