summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cse.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-11-01 08:28:22 +0000
committerobrien <obrien@FreeBSD.org>1999-11-01 08:28:22 +0000
commit4b66dfb9030fa6d9912fcf3dfbe3fa8a4fa0a3fc (patch)
tree0e33a2f257e9df8e4af5c0ecf0304ce5239fa3bf /contrib/gcc/cse.c
parent1d061a7b0a9151a14d61c129611f720697c28e76 (diff)
downloadFreeBSD-src-4b66dfb9030fa6d9912fcf3dfbe3fa8a4fa0a3fc.zip
FreeBSD-src-4b66dfb9030fa6d9912fcf3dfbe3fa8a4fa0a3fc.tar.gz
Virgin import of the GCC 2.95.2 compilers
Diffstat (limited to 'contrib/gcc/cse.c')
-rw-r--r--contrib/gcc/cse.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/gcc/cse.c b/contrib/gcc/cse.c
index 45613ed..7182b74 100644
--- a/contrib/gcc/cse.c
+++ b/contrib/gcc/cse.c
@@ -5861,7 +5861,15 @@ fold_rtx (x, insn)
hence not save anything) or be incorrect. */
if (const_arg1 != 0 && GET_CODE (const_arg1) == CONST_INT
&& INTVAL (const_arg1) < 0
- && - INTVAL (const_arg1) >= 0
+ /* This used to test
+
+ - INTVAL (const_arg1) >= 0
+
+ But The Sun V5.0 compilers mis-compiled that test. So
+ instead we test for the problematic value in a more direct
+ manner and hope the Sun compilers get it correct. */
+ && INTVAL (const_arg1) !=
+ ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT - 1))
&& GET_CODE (folded_arg1) == REG)
{
rtx new_const = GEN_INT (- INTVAL (const_arg1));
OpenPOWER on IntegriCloud