aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 966ed62..2e9967c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-01-10 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * combine.c (expand_field_assignment): Do not discard SUBREGs
+ while computing nonzero_bits.
+
2000-01-09 Nick Clifton <nickc@cygnus.com>
* config/arm/arm.c: Fix compile time warnings about signed vs
diff --git a/gcc/combine.c b/gcc/combine.c
index f8be80c..484d687 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5656,6 +5656,8 @@ expand_field_assignment (x)
/* A SUBREG between two modes that occupy the same numbers of words
can be done by moving the SUBREG to the source. */
else if (GET_CODE (SET_DEST (x)) == SUBREG
+ /* We need SUBREGs to compute nonzero_bits properly. */
+ && nonzero_sign_valid
&& (((GET_MODE_SIZE (GET_MODE (SET_DEST (x)))
+ (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)
== ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (SET_DEST (x))))