aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 2ade695b980..f880b461f26 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1572,7 +1572,11 @@ simplify_binary_operation (enum rtx_code code, enum machine_mode mode,
return simplify_gen_unary (NEG, mode, op1, mode);
/* (-1 - a) is ~a. */
- if (trueop0 == constm1_rtx)
+ /* APPLE LOCAL disallow (not (SYM))
+ But not when a is relocatable (this arises temporarily when
+ pulling 386 global addresses out of a loop). */
+ if (trueop0 == constm1_rtx
+ && GET_CODE (op1) != SYMBOL_REF )
return simplify_gen_unary (NOT, mode, op1, mode);
/* Subtracting 0 has no effect unless the mode has signed zeros