fold-const.c (fold): Revert last change.
authorRichard Henderson <rth@cygnus.com>
Fri, 12 Jun 1998 09:34:00 +0000 (02:34 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 12 Jun 1998 09:34:00 +0000 (02:34 -0700)
        * fold-const.c (fold): Revert last change.  It breaks constant
        expressions somehow.

From-SVN: r20441

gcc/ChangeLog
gcc/fold-const.c

index 96dc22cbc95b22ec836aa0af98101db49edced95..78bc3e73d3e9c83237c548de721419f077d7abff 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jun 12 09:33:44 1998  Richard Henderson <rth@cygnus.com>
+
+       * fold-const.c (fold): Revert last change.  It breaks constant
+       expressions somehow.
+
 Fri Jun 12 10:23:36 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * expr.c (do_jump, case EQ_EXPR, NE_EXPR): When comparing complex
index 18e83852d1b8c81777abfb4c38051066852dc897..5daa253a44962b1e568214dfaf43f5045c48dc60 100644 (file)
@@ -4433,12 +4433,9 @@ fold (expr)
                    return convert (TREE_TYPE (t), con);
                    
                  /* If ARG0 is a constant, don't change things around;
-                    instead keep all the constant computations together.
-                    Notice, however, if we can merge integer constants.  */
+                    instead keep all the constant computations together.  */
 
-                 if (TREE_CONSTANT (arg0)
-                     && !(TREE_CODE (con) == INTEGER_CST
-                          && TREE_CODE (arg1) == INTEGER_CST))
+                 if (TREE_CONSTANT (arg0))
                    return t;
 
                  /* Otherwise return (CON +- ARG1) - VAR.  */
@@ -4453,12 +4450,9 @@ fold (expr)
                    return convert (TREE_TYPE (t), con);
                    
                  /* If ARG0 is a constant, don't change things around;
-                    instead keep all the constant computations together.
-                    Notice, however, if we can merge integer constants.  */
+                    instead keep all the constant computations together.  */
 
-                 if (TREE_CONSTANT (arg0)
-                     && !(TREE_CODE (con) == INTEGER_CST
-                          && TREE_CODE (arg1) == INTEGER_CST))
+                 if (TREE_CONSTANT (arg0))
                    return t;
 
                  /* Otherwise return VAR +- (ARG1 +- CON).  */
@@ -4487,13 +4481,7 @@ fold (expr)
 
          if (split_tree (arg1, code, &var, &con, &varsign))
            {
-             /* If ARG1 is a constant, don't change things around;
-                instead keep all the constant computations together.
-                Notice, however, if we can merge integer constants.  */
-
-             if (TREE_CONSTANT (arg1)
-                 && !(TREE_CODE (con) == INTEGER_CST
-                      && TREE_CODE (arg0) == INTEGER_CST))
+             if (TREE_CONSTANT (arg1))
                return t;
 
              if (varsign == -1)