diff options
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; } |