diff options
author | Richard Henderson <rth@cygnus.com> | 1998-06-12 02:34:00 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1998-06-12 02:34:00 -0700 |
commit | 77a45a2ea44010cabd700d777ac8b3557021bafa (patch) | |
tree | cc12dcf3279cc9f528603a60ce1954a76753dc3f /gcc | |
parent | 8d62b411cf5f8c9225388d466934878fc2c8e379 (diff) | |
download | gcc-77a45a2ea44010cabd700d777ac8b3557021bafa.zip gcc-77a45a2ea44010cabd700d777ac8b3557021bafa.tar.gz gcc-77a45a2ea44010cabd700d777ac8b3557021bafa.tar.bz2 |
fold-const.c (fold): Revert last change.
* fold-const.c (fold): Revert last change. It breaks constant
expressions somehow.
From-SVN: r20441
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fold-const.c | 22 |
2 files changed, 10 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96dc22c..78bc3e7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 18e8385..5daa253 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -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) |