diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-07-26 20:26:20 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-07-26 20:26:20 -0400 |
commit | e5075818720b781f7da518311bfa0f9f3cf33572 (patch) | |
tree | b86da7334840377c03b15be7c9476d4bbc2edd45 | |
parent | 437b3c097dbc0157e978e2e31c672542cf72d564 (diff) | |
download | gcc-e5075818720b781f7da518311bfa0f9f3cf33572.zip gcc-e5075818720b781f7da518311bfa0f9f3cf33572.tar.gz gcc-e5075818720b781f7da518311bfa0f9f3cf33572.tar.bz2 |
(fold, case EQ_EXPR): Remove code that converts mod to unsigned mod;
it isn't correct for negative operands.
From-SVN: r4995
-rw-r--r-- | gcc/fold-const.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 5b9d851..5f23e98 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4203,6 +4203,10 @@ fold (expr) arg1)); } + /* It would be nice to do this since it generates better code. + Unfortunately, it doesn't produce the correct result if the + first operand is negative. */ +#if 0 /* If this is an NE or EQ comparison of zero against the result of a signed MOD operation, make the MOD operation unsigned since it is simpler and equivalent. */ @@ -4221,6 +4225,7 @@ fold (expr) return build (code, type, newmod, convert (newtype, arg1)); } +#endif /* If this is an NE comparison of zero with an AND of one, remove the comparison since the AND will give the correct value. */ |