aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1999-12-06 23:22:47 +0000
committerJim Wilson <wilson@gcc.gnu.org>1999-12-06 15:22:47 -0800
commit402b6c2a7aec8bac15a092efcc9612ae4bc3468a (patch)
tree1344c2997ec0fc0d0ef7a31b1aab9e5902aa2c99 /gcc/combine.c
parentde1f429d34431c2609b8d88588b63ade95abf0e7 (diff)
downloadgcc-402b6c2a7aec8bac15a092efcc9612ae4bc3468a.zip
gcc-402b6c2a7aec8bac15a092efcc9612ae4bc3468a.tar.gz
gcc-402b6c2a7aec8bac15a092efcc9612ae4bc3468a.tar.bz2
Fix ia64 execute/930630-1.c miscompilation.
* combine.c (force_to_mode, case LSHIFTRT): New local inner_mask. Set inner_mask instead of mask. From-SVN: r30812
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 825d8a7..c3864e0 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -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));