From: Richard Henderson Date: Wed, 16 Aug 2000 06:22:20 +0000 (-0700) Subject: combine.c (simplify_shift_const): Bound shift count when combining shifts. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e626beb95980cff96e1065ccff070ac27c44d6a;p=gcc.git combine.c (simplify_shift_const): Bound shift count when combining shifts. * combine.c (simplify_shift_const): Bound shift count when combining shifts. From-SVN: r35739 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a08964e375..40df92ab810 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-08-15 Richard Henderson + + * combine.c (simplify_shift_const): Bound shift count when + combining shifts. + Tue Aug 15 17:33:05 2000 Richard Kenner * calls.c (ECF_SP_DEPRESSED): New macro. diff --git a/gcc/combine.c b/gcc/combine.c index 4ad2f4f3b17..e4be714abb5 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -9149,6 +9149,8 @@ simplify_shift_const (x, code, result_mode, varop, input_count) break; count += first_count; + if (count >= GET_MODE_BITSIZE (shift_mode)) + count = GET_MODE_BITSIZE (shift_mode) - 1; varop = XEXP (varop, 0); continue; } @@ -9202,6 +9204,9 @@ simplify_shift_const (x, code, result_mode, varop, input_count) else count = signed_count; + if (count >= GET_MODE_BITSIZE (shift_mode)) + count = GET_MODE_BITSIZE (shift_mode) - 1; + varop = XEXP (varop, 0); continue; }