combine.c (try_combine): Mask off sign bits when combining stores to the low and...
authorGeoffrey Keating <geoffk@redhat.com>
Fri, 28 Dec 2001 07:52:44 +0000 (07:52 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 28 Dec 2001 07:52:44 +0000 (07:52 +0000)
* combine.c (try_combine): Mask off sign bits when combining
stores to the low and high parts of a two-word value.

From-SVN: r48339

gcc/ChangeLog
gcc/combine.c

index 6af9545921325c0aff90e9e85819d3d9361bf3dc..b11afd83e2388a473d8005ebada7284e81fdb9c4 100644 (file)
@@ -1,5 +1,8 @@
 2001-12-27  Geoff Keating  <geoffk@redhat.com>
 
+       * combine.c (try_combine): Mask off sign bits when combining
+       stores to the low and high parts of a two-word value.
+
        * expr.c (expand_expr): Don't mark memory for non-constants as
        constant.
 
index 1fa63b80c9e07370da91d6d2c8e3e2e3194141f0..a25909d14a29d289ae1eb889c5dd3e315c3c0638 100644 (file)
@@ -1650,7 +1650,8 @@ try_combine (i3, i2, i1, new_direct_jump_p)
            abort ();
 
          lo &= ~(UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD (1) - 1);
-         lo |= INTVAL (SET_SRC (PATTERN (i3)));
+         lo |= (INTVAL (SET_SRC (PATTERN (i3))) 
+                & (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD (1) - 1));
        }
       else if (HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
        hi = INTVAL (SET_SRC (PATTERN (i3)));