diff options
author | Eric Botcazou <ebotcazou@act-europe.fr> | 2004-02-27 09:11:34 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2004-02-27 08:11:34 +0000 |
commit | 288dc1eae2f0349f257da93a8cba7fae0404ff05 (patch) | |
tree | 89b9c323fc395b30c52bd4ad180647a25da37dd4 /gcc/fold-const.c | |
parent | 7a0a47c77ffab06d18d4a0fc54905060eaeecd05 (diff) | |
download | gcc-288dc1eae2f0349f257da93a8cba7fae0404ff05.zip gcc-288dc1eae2f0349f257da93a8cba7fae0404ff05.tar.gz gcc-288dc1eae2f0349f257da93a8cba7fae0404ff05.tar.bz2 |
fold-const.c (fold): Revert 2004-02-25 change.
* fold-const.c (fold): Revert 2004-02-25 change. Use the original
operands to build a tree with swapped operands.
* expr.c (expand_expr_real) <MAX_EXPR>: Consistently use the
'unsignedp' predicate to specify the signedness.
Co-Authored-By: Roger Sayle <roger@eyesopen.com>
From-SVN: r78558
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 956478a..9178a344 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -5423,10 +5423,7 @@ fold (tree expr) if (op == 0) continue; /* Valid for CALL_EXPR, at least. */ - if (kind == '<' - || code == MAX_EXPR - || code == MIN_EXPR - || code == RSHIFT_EXPR) + if (kind == '<' || code == RSHIFT_EXPR) { /* Signedness matters here. Perhaps we can refine this later. */ @@ -5459,7 +5456,8 @@ fold (tree expr) to ARG1 to reduce the number of tests below. */ if (commutative_tree_code (code) && tree_swap_operands_p (arg0, arg1, true)) - return fold (build (code, type, arg1, arg0)); + return fold (build (code, type, TREE_OPERAND (t, 1), + TREE_OPERAND (t, 0))); /* Now WINS is set as described above, ARG0 is the first operand of EXPR, |