diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-12 09:34:00 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-12 09:34:00 +0000 |
commit | 57d47a6d708b63de3fb5d83ee5633d3fe7ca2d10 (patch) | |
tree | cc12dcf3279cc9f528603a60ce1954a76753dc3f /gcc/fold-const.c | |
parent | c89676f9bdedbeb2aff64700e7dfe04dafa60c79 (diff) | |
download | gcc-57d47a6d708b63de3fb5d83ee5633d3fe7ca2d10.tar.gz |
* fold-const.c (fold): Revert last change. It breaks constant
expressions somehow.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20441 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 18e83852d1b..5daa253a449 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) |