summaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-28 05:41:44 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-28 05:41:44 +0000
commitaaa2446c620a039ccfb5fe2eb5031fa190451547 (patch)
treec44b1ad675dbae1b4038cef72adb99304cf247e9 /gcc/cse.c
parent4ea56225773c429c9ff1e5eaf8bc28e5441b5c7b (diff)
downloadgcc-aaa2446c620a039ccfb5fe2eb5031fa190451547.tar.gz
* cse.c (fold_rtx): Work around bug in Sun V5.0 compilers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28941 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index c39ab9f8522..7a13a7b2d24 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5802,7 +5802,14 @@ 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) != (1 << (HOST_BITS_PER_WIDE_INT - 1))
&& GET_CODE (folded_arg1) == REG)
{
rtx new_const = GEN_INT (- INTVAL (const_arg1));