]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
recog.c (constrain_operands): Only look for earlyclobber operand conflicts if an...
authorSteven Bosscher <stevenb@suse.de>
Mon, 31 Jan 2005 21:14:44 +0000 (21:14 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Mon, 31 Jan 2005 21:14:44 +0000 (21:14 +0000)
* recog.c (constrain_operands): Only look for earlyclobber operand
conflicts if an '&' constraint was seen.

From-SVN: r94493

gcc/ChangeLog
gcc/recog.c

index 7591aecc78608c9d8661a79a36be1b7921498bca..76e28d1ef4af3ead7f9bc1e4c344f1571a6aae4b 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-31  Steven Bosscher  <stevenb@suse.de>
+
+       * recog.c (constrain_operands): Only look for earlyclobber operand
+       conflicts if an '&' constraint was seen.
+
 2005-01-31  Marc Espie <espie@openbsd.org>
 
        * config.gcc: Don't include embedded systems fragment, switches default
index 4dfdca1fbebfdeafca69679d2a85cab2e06dc15c..28b241075ab6bf41000d9ca156422a5738591b96 100644 (file)
@@ -2233,6 +2233,7 @@ constrain_operands (int strict)
 
   do
     {
+      int seen_earlyclobber_at = -1;
       int opno;
       int lose = 0;
       funny_match_index = 0;
@@ -2295,6 +2296,8 @@ constrain_operands (int strict)
 
              case '&':
                earlyclobber[opno] = 1;
+               if (seen_earlyclobber_at < 0)
+                 seen_earlyclobber_at = opno;
                break;
 
              case '0':  case '1':  case '2':  case '3':  case '4':
@@ -2543,8 +2546,10 @@ constrain_operands (int strict)
          /* See if any earlyclobber operand conflicts with some other
             operand.  */
 
-         if (strict > 0)
-           for (eopno = 0; eopno < recog_data.n_operands; eopno++)
+         if (strict > 0  && seen_earlyclobber_at >= 0)
+           for (eopno = seen_earlyclobber_at;
+                eopno < recog_data.n_operands;
+                eopno++)
              /* Ignore earlyclobber operands now in memory,
                 because we would often report failure when we have
                 two memory operands, one of which was formerly a REG.  */