diff options
author | Richard Henderson <rth@cygnus.com> | 2000-08-15 23:22:20 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-08-15 23:22:20 -0700 |
commit | 3e626beb95980cff96e1065ccff070ac27c44d6a (patch) | |
tree | 447e48cb1b2e1020f9a51bb24a77f03a7a756c47 /gcc/combine.c | |
parent | 8e7c93fe34318458fe384035cf6b89fbb20db7d6 (diff) | |
download | gcc-3e626beb95980cff96e1065ccff070ac27c44d6a.zip gcc-3e626beb95980cff96e1065ccff070ac27c44d6a.tar.gz gcc-3e626beb95980cff96e1065ccff070ac27c44d6a.tar.bz2 |
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
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 4ad2f4f..e4be714 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; } |