OSDN Git Service

Fix ia64 execute/930630-1.c miscompilation.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Dec 1999 23:22:47 +0000 (23:22 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Dec 1999 23:22:47 +0000 (23:22 +0000)
* combine.c (force_to_mode, case LSHIFTRT): New local inner_mask.  Set
inner_mask instead of mask.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30812 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/combine.c

index 2932e8c..505c799 100644 (file)
@@ -1,3 +1,8 @@
+Mon Dec  6 15:12:14 1999  Jim Wilson  <wilson@cygnus.com>
+
+       * combine.c (force_to_mode, case LSHIFTRT): New local inner_mask.  Set
+       inner_mask instead of mask.
+
 1999-12-06  Brendan Kehoe  <brendan@cygnus.com>
 
        * dwarf2out.c (field_byte_offset): As with dwarfout.c, size can be
index 825d8a7..c3864e0 100644 (file)
@@ -6815,18 +6815,19 @@ force_to_mode (x, mode, mask, reg, just_select)
          && GET_MODE_BITSIZE (op_mode) <= HOST_BITS_PER_WIDE_INT)
        {
          rtx inner = XEXP (x, 0);
+         unsigned HOST_WIDE_INT inner_mask;
 
          /* Select the mask of the bits we need for the shift operand.  */
-         mask <<= INTVAL (XEXP (x, 1));
+         inner_mask = mask << INTVAL (XEXP (x, 1));
 
          /* We can only change the mode of the shift if we can do arithmetic
-            in the mode of the shift and MASK is no wider than the width of
-            OP_MODE.  */
+            in the mode of the shift and INNER_MASK is no wider than the
+            width of OP_MODE.  */
          if (GET_MODE_BITSIZE (op_mode) > HOST_BITS_PER_WIDE_INT
-             || (mask & ~ GET_MODE_MASK (op_mode)) != 0)
+             || (inner_mask & ~ GET_MODE_MASK (op_mode)) != 0)
            op_mode = GET_MODE (x);
 
-         inner = force_to_mode (inner, op_mode, mask, reg, next_select);
+         inner = force_to_mode (inner, op_mode, inner_mask, reg, next_select);
 
          if (GET_MODE (x) != op_mode || inner != XEXP (x, 0))
            x = gen_binary (LSHIFTRT, op_mode, inner, XEXP (x, 1));