combine.c (try_combine): Only pass SET or CLOBBER to SET_DEST
authorFranz Sirl <Franz.Sirl-kernel@lauterbach.com>
Tue, 30 Nov 1999 23:19:06 +0000 (23:19 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 30 Nov 1999 23:19:06 +0000 (15:19 -0800)
        * combine.c (try_combine): Only pass SET or CLOBBER to SET_DEST
        * rs6000.md: Only access a CONST_INT with INTVAL

From-SVN: r30729

gcc/ChangeLog
gcc/combine.c
gcc/config/rs6000/rs6000.md

index 317ee8f0f4a45c30b56e1d2794aa7ff7006ec64d..b77d214dc18cbd413e28b44ad2c4eee7efa66fda 100644 (file)
@@ -1,3 +1,8 @@
+Tue Nov 30 15:18:35 1999  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
+
+       * combine.c (try_combine): Only pass SET or CLOBBER to SET_DEST
+       * rs6000.md: Only access a CONST_INT with INTVAL
+
 Tue Nov 30 14:21:00 1999  Richard Henderson  <rth@cygnus.com>
 
        * lcm.c (compute_laterin): Cast bb->aux to size_t not int.
index 8f14d7df92746509a13ba64459d6ee5580cd70e8..e7e0a6933006a0b4c86d489a2074878c1ebcd030 100644 (file)
@@ -1547,7 +1547,9 @@ try_combine (i3, i2, i1)
 
       if (i == XVECLEN (p2, 0))
        for (i = 0; i < XVECLEN (p2, 0); i++)
-         if (SET_DEST (XVECEXP (p2, 0, i)) == SET_SRC (PATTERN (i3)))
+         if ((GET_CODE (XVECEXP (p2, 0, i)) == SET
+              || GET_CODE (XVECEXP (p2, 0, i)) == CLOBBER)
+             && SET_DEST (XVECEXP (p2, 0, i)) == SET_SRC (PATTERN (i3)))
            {
              combine_merges++;
 
index 7d313abcd34e5e45fe4aa095c41aee10fe1824c8..8d6e85cb21b6247f2041e975c220a5ec6eea19a5 100644 (file)
   ""
   "
 {
-  int i = exact_log2 (INTVAL (operands[2]));
+  int i;
   rtx temp1;
   rtx temp2;
 
-  if (GET_CODE (operands[2]) != CONST_INT || i < 0)
+  if (GET_CODE (operands[2]) != CONST_INT)
+    FAIL;
+
+  i = exact_log2 (INTVAL (operands[2]));
+
+  if (i < 0)
     FAIL;
 
   temp1 = gen_reg_rtx (SImode);