rtlanal.c (single_set): Reject if the parallel has anything except SET or USE or...
authorRichard Henderson <rth@cygnus.com>
Fri, 17 Mar 2000 23:24:30 +0000 (15:24 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 17 Mar 2000 23:24:30 +0000 (15:24 -0800)
        * rtlanal.c (single_set): Reject if the parallel has anything
        except SET or USE or CLOBBER.

From-SVN: r32614

gcc/ChangeLog
gcc/rtlanal.c

index 84cd1bb8810f29cbd31fca4416f708a11b9d6dd2..68ac1f2b7e6cee39e86c5c02aab0e2433781eda6 100644 (file)
@@ -1,3 +1,8 @@
+2000-03-17  Richard Henderson  <rth@cygnus.com>
+
+       * rtlanal.c (single_set): Reject if the parallel has anything
+       except SET or USE or CLOBBER.
+
 2000-03-17  Jeff Law  <law@cygnus.com>
            Richard Henderson  <rth@cygnus.com>
 
index 5c7e527c80f87e6e78ecdcf600822a1f60ce37cf..b10a3bf3438b89ab7390b9c297a3702fd313eae4 100644 (file)
@@ -703,16 +703,30 @@ single_set (insn)
   else if (GET_CODE (PATTERN (insn)) == PARALLEL)
     {
       for (i = 0, set = 0; i < XVECLEN (PATTERN (insn), 0); i++)
-       if (GET_CODE (XVECEXP (PATTERN (insn), 0, i)) == SET
-           && (! find_reg_note (insn, REG_UNUSED,
-                                SET_DEST (XVECEXP (PATTERN (insn), 0, i)))
-               || side_effects_p (XVECEXP (PATTERN (insn), 0, i))))
-         {
-           if (set)
+       {
+         rtx sub = XVECEXP (PATTERN (insn), 0, i);
+
+         switch (GET_CODE (sub))
+           {
+           case USE:
+           case CLOBBER:
+             break;
+
+           case SET:
+             if (! find_reg_note (insn, REG_UNUSED, SET_DEST (sub))
+                 || side_effects_p (sub))
+               {
+                 if (set)
+                   return 0;
+                 else
+                   set = sub;
+               }
+             break;
+
+           default:
              return 0;
-           else
-             set = XVECEXP (PATTERN (insn), 0, i);
-         }
+           }
+       }
       return set;
     }