aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-08-15 23:22:20 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-08-15 23:22:20 -0700
commit3e626beb95980cff96e1065ccff070ac27c44d6a (patch)
tree447e48cb1b2e1020f9a51bb24a77f03a7a756c47
parent8e7c93fe34318458fe384035cf6b89fbb20db7d6 (diff)
downloadgcc-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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1a08964..40df92a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-15 Richard Henderson <rth@cygnus.com>
+
+ * combine.c (simplify_shift_const): Bound shift count when
+ combining shifts.
+
Tue Aug 15 17:33:05 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* calls.c (ECF_SP_DEPRESSED): New macro.
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;
}