aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1996-12-16 18:25:39 -0800
committerJim Wilson <wilson@gcc.gnu.org>1996-12-16 18:25:39 -0800
commitb3728b0e0e28b8cf7a3f4f2fe7bd85f21a722ad3 (patch)
tree3af77f2397ce8badc67a08ed1914ea14589f82b9 /gcc
parent7b1bcb4940fcbb05d359df63900e089120c3addb (diff)
downloadgcc-b3728b0e0e28b8cf7a3f4f2fe7bd85f21a722ad3.zip
gcc-b3728b0e0e28b8cf7a3f4f2fe7bd85f21a722ad3.tar.gz
gcc-b3728b0e0e28b8cf7a3f4f2fe7bd85f21a722ad3.tar.bz2
(nonzero_bits): Ifdef out calls to num_sign_bit_copies.
Add dummy define/undef for num_sign_bit_copies. From-SVN: r13314
Diffstat (limited to 'gcc')
-rw-r--r--gcc/combine.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index f4e0b97..57100b9 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7072,6 +7072,13 @@ simplify_and_const_int (x, mode, varop, constop)
return x;
}
+/* We let num_sign_bit_copies recur into nonzero_bits as that is useful.
+ We don't let nonzero_bits recur into num_sign_bit_copies, because that
+ is less useful. We can't allow both, because that results in exponential
+ run time recusion. There is a nullstone testcase that triggered
+ this. This macro avoids accidental uses of num_sign_bit_copies. */
+#define num_sign_bit_copies()
+
/* Given an expression, X, compute which bits in X can be non-zero.
We don't care about bits outside of those defined in MODE.
@@ -7246,18 +7253,26 @@ nonzero_bits (x, mode)
break;
case NEG:
+#if 0
+ /* Disabled to avoid exponential mutual recursion between nonzero_bits
+ and num_sign_bit_copies. */
if (num_sign_bit_copies (XEXP (x, 0), GET_MODE (x))
== GET_MODE_BITSIZE (GET_MODE (x)))
nonzero = 1;
+#endif
if (GET_MODE_SIZE (GET_MODE (x)) < mode_width)
nonzero |= (GET_MODE_MASK (mode) & ~ GET_MODE_MASK (GET_MODE (x)));
break;
case ABS:
+#if 0
+ /* Disabled to avoid exponential mutual recursion between nonzero_bits
+ and num_sign_bit_copies. */
if (num_sign_bit_copies (XEXP (x, 0), GET_MODE (x))
== GET_MODE_BITSIZE (GET_MODE (x)))
nonzero = 1;
+#endif
break;
case TRUNCATE:
@@ -7456,6 +7471,9 @@ nonzero_bits (x, mode)
return nonzero;
}
+
+/* See the macro definition above. */
+#undef num_sign_bit_copies
/* Return the number of bits at the high-order end of X that are known to
be equal to the sign bit. X will be used in mode MODE; if MODE is