From 54c9abc009c319097cec94a3a18e1b35c5f23629 Mon Sep 17 00:00:00 2001 From: wilson Date: Mon, 16 Dec 1996 20:27:35 +0000 Subject: (simplify_comparison): Use mode_width as shift count only if it is less than or equal to HOST_BITS_PER_WIDE_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13312 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/combine.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/combine.c b/gcc/combine.c index 38641104f19..f4e0b97e5b0 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -9296,7 +9296,8 @@ simplify_comparison (code, pop0, pop1) } /* (unsigned) < 0x80000000 is equivalent to >= 0. */ - else if (const_op == (HOST_WIDE_INT) 1 << (mode_width - 1)) + else if ((mode_width <= HOST_BITS_PER_WIDE_INT) + && (const_op == (HOST_WIDE_INT) 1 << (mode_width - 1))) { const_op = 0, op1 = const0_rtx; code = GE; @@ -9311,7 +9312,8 @@ simplify_comparison (code, pop0, pop1) code = EQ; /* (unsigned) <= 0x7fffffff is equivalent to >= 0. */ - else if (const_op == ((HOST_WIDE_INT) 1 << (mode_width - 1)) - 1) + else if ((mode_width <= HOST_BITS_PER_WIDE_INT) + && (const_op == ((HOST_WIDE_INT) 1 << (mode_width - 1)) - 1)) { const_op = 0, op1 = const0_rtx; code = GE; @@ -9329,7 +9331,8 @@ simplify_comparison (code, pop0, pop1) } /* (unsigned) >= 0x80000000 is equivalent to < 0. */ - else if (const_op == (HOST_WIDE_INT) 1 << (mode_width - 1)) + else if ((mode_width <= HOST_BITS_PER_WIDE_INT) + && (const_op == (HOST_WIDE_INT) 1 << (mode_width - 1))) { const_op = 0, op1 = const0_rtx; code = LT; @@ -9344,7 +9347,8 @@ simplify_comparison (code, pop0, pop1) code = NE; /* (unsigned) > 0x7fffffff is equivalent to < 0. */ - else if (const_op == ((HOST_WIDE_INT) 1 << (mode_width - 1)) - 1) + else if ((mode_width <= HOST_BITS_PER_WIDE_INT) + && (const_op == ((HOST_WIDE_INT) 1 << (mode_width - 1)) - 1)) { const_op = 0, op1 = const0_rtx; code = LT; -- cgit v1.2.1