aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@wasabisystems.com>2003-09-11 04:44:23 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2003-09-11 04:44:23 +0000
commit50b29dbb90217345d2253a9a5397a513cdf317a5 (patch)
treeefe8e130ede7b975e690dbbcac8e7c7d5170cb05
parentdbc66058f0bc72234e3926846dc19211ac93a952 (diff)
downloadgcc-50b29dbb90217345d2253a9a5397a513cdf317a5.zip
gcc-50b29dbb90217345d2253a9a5397a513cdf317a5.tar.gz
gcc-50b29dbb90217345d2253a9a5397a513cdf317a5.tar.bz2
combine.c (force_to_mode): Set fuller_mask based only on mask, not op_mode.
* combine.c (force_to_mode): Set fuller_mask based only on mask, not op_mode. From-SVN: r71292
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c12
2 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3a68a05..f6e1b35 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-10 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * combine.c (force_to_mode): Set fuller_mask based only on mask,
+ not op_mode.
+
Thu Sep 11 01:21:05 CEST 2003 Jan Hubicka <jh@suse.cz>
* c-objc-common.c (c_cannot_inline_tree_fn): Warn
diff --git a/gcc/combine.c b/gcc/combine.c
index 0853a2c..5f005e4 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -6833,15 +6833,13 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask,
mask &= GET_MODE_MASK (op_mode);
/* When we have an arithmetic operation, or a shift whose count we
- do not know, we need to assume that all bit the up to the highest-order
+ do not know, we need to assume that all bits up to the highest-order
bit in MASK will be needed. This is how we form such a mask. */
- if (op_mode)
- fuller_mask = (GET_MODE_BITSIZE (op_mode) >= HOST_BITS_PER_WIDE_INT
- ? GET_MODE_MASK (op_mode)
- : (((unsigned HOST_WIDE_INT) 1 << (floor_log2 (mask) + 1))
- - 1));
+ if (mask & ((unsigned HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT - 1)))
+ fuller_mask = ~(unsigned HOST_WIDE_INT) 0;
else
- fuller_mask = ~(HOST_WIDE_INT) 0;
+ fuller_mask = (((unsigned HOST_WIDE_INT) 1 << (floor_log2 (mask) + 1))
+ - 1);
/* Determine what bits of X are guaranteed to be (non)zero. */
nonzero = nonzero_bits (x, mode);