recog.c (store_data_bypass_p): Handle out_insn being a PARALLEL of SETs.
authorDavid S. Miller <davem@redhat.com>
Sun, 5 May 2002 07:49:23 +0000 (00:49 -0700)
committerDavid S. Miller <davem@gcc.gnu.org>
Sun, 5 May 2002 07:49:23 +0000 (00:49 -0700)
2002-05-04  David S. Miller  <davem@redhat.com>

* recog.c (store_data_bypass_p): Handle out_insn being a PARALLEL
of SETs.

From-SVN: r53177

gcc/ChangeLog
gcc/recog.c

index 906e3b54a0fd0bcb023a0514f2f2723cdb5b6236..a32642c6beeddd1927150de394695fde395b90b1 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-04  David S. Miller  <davem@redhat.com>
+
+       * recog.c (store_data_bypass_p): Handle out_insn being a PARALLEL
+       of SETs.
+
 2002-05-05  Tim Josling  <tej@melbpc.org.au>
 
        * treelang; New directory for new sample language treelang. 
index 2b85d4b0a25dddcbab5e36ce069294efbe151b75..2fd1126044aeca55e86698ce1e8461b4703c8694 100644 (file)
@@ -3279,8 +3279,9 @@ peephole2_optimize (dump_file)
 /* Common predicates for use with define_bypass.  */
 
 /* True if the dependency between OUT_INSN and IN_INSN is on the store
-   data not the address operand(s) of the store.  Both OUT_INSN and IN_INSN
-   must be single_set.  */
+   data not the address operand(s) of the store.  IN_INSN must be
+   single_set.  OUT_INSN must be either a single_set or a PARALLEL with
+   SETs inside.  */
 
 int
 store_data_bypass_p (out_insn, in_insn)
@@ -3288,10 +3289,6 @@ store_data_bypass_p (out_insn, in_insn)
 {
   rtx out_set, in_set;
 
-  out_set = single_set (out_insn);
-  if (! out_set)
-    abort ();
-
   in_set = single_set (in_insn);
   if (! in_set)
     abort ();
@@ -3299,8 +3296,32 @@ store_data_bypass_p (out_insn, in_insn)
   if (GET_CODE (SET_DEST (in_set)) != MEM)
     return false;
 
-  if (reg_mentioned_p (SET_DEST (out_set), SET_DEST (in_set)))
-    return false;
+  out_set = single_set (out_insn);
+  if (out_set)
+    {
+      if (reg_mentioned_p (SET_DEST (out_set), SET_DEST (in_set)))
+       return false;
+    }
+  else
+    {
+      rtx out_pat;
+      int i;
+
+      out_pat = PATTERN (out_insn);
+      if (GET_CODE (out_pat) != PARALLEL)
+       abort ();
+
+      for (i = 0; i < XVECLEN (out_pat, 0); i++)
+       {
+         rtx exp = XVECEXP (out_pat, 0, i);
+
+         if (GET_CODE (exp) != SET)
+           abort ();
+
+         if (reg_mentioned_p (SET_DEST (exp), SET_DEST (in_set)))
+           return false;
+       }
+    }
 
   return true;
 }