summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-07-27 00:26:20 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-07-27 00:26:20 +0000
commiteb69adcedede4616434d522ba1242ca2ae4ac3d1 (patch)
treeb86da7334840377c03b15be7c9476d4bbc2edd45 /gcc
parent3bdaad0b41ba8bd2528938c13626b7dad5ba3b8d (diff)
downloadgcc-eb69adcedede4616434d522ba1242ca2ae4ac3d1.tar.gz
(fold, case EQ_EXPR): Remove code that converts mod to unsigned mod;
it isn't correct for negative operands. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4995 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fold-const.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 5b9d8511cbe..5f23e98ff95 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. */