diff options
| author | Alexander Kabaev <kan@FreeBSD.org> | 2003-02-10 05:41:50 +0000 |
|---|---|---|
| committer | Alexander Kabaev <kan@FreeBSD.org> | 2003-02-10 05:41:50 +0000 |
| commit | 72983f38e19d795e4671ce8231e076df7f6c5bc0 (patch) | |
| tree | 636a10692c73f4e15c4e3c4effae1b84e967dab9 /contrib/gcc/combine.c | |
| parent | 3749dff3f9323596a9326efa4bf2b560c0e9d1d3 (diff) | |
| parent | 7b74929d749aa5688fd0814a9880872323e02cde (diff) | |
Notes
Diffstat (limited to 'contrib/gcc/combine.c')
| -rw-r--r-- | contrib/gcc/combine.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/gcc/combine.c b/contrib/gcc/combine.c index acaf3b15869a..5e8ad1ac3a28 100644 --- a/contrib/gcc/combine.c +++ b/contrib/gcc/combine.c @@ -6016,6 +6016,11 @@ make_extraction (mode, inner, pos, pos_rtx, len, final_word += (GET_MODE_SIZE (inner_mode) - GET_MODE_SIZE (tmode)) % UNITS_PER_WORD; + /* Avoid creating invalid subregs, for example when + simplifying (x>>32)&255. */ + if (final_word >= GET_MODE_SIZE (inner_mode)) + return NULL_RTX; + new = gen_rtx_SUBREG (tmode, inner, final_word); } else @@ -6852,10 +6857,10 @@ force_to_mode (x, mode, mask, reg, just_select) return force_to_mode (x, mode, mask, reg, next_select); } - /* Similarly, if C contains every bit in the mask, then we may + /* Similarly, if C contains every bit in the fuller_mask, then we may replace with (not Y). */ if (GET_CODE (XEXP (x, 0)) == CONST_INT - && ((INTVAL (XEXP (x, 0)) | (HOST_WIDE_INT) mask) + && ((INTVAL (XEXP (x, 0)) | (HOST_WIDE_INT) fuller_mask) == INTVAL (XEXP (x, 0)))) { x = simplify_gen_unary (NOT, GET_MODE (x), |
