diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1995-12-18 18:45:11 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1995-12-18 18:45:11 -0800 |
commit | f82da7d270d2bf27905b338f28622c3546ad9306 (patch) | |
tree | 0c17c1f95313f2b964e496aa7dea2ea2e1a30f67 | |
parent | e24b8776094a482b0e9bdcadc9a697aca06e733a (diff) | |
download | gcc-f82da7d270d2bf27905b338f28622c3546ad9306.zip gcc-f82da7d270d2bf27905b338f28622c3546ad9306.tar.gz gcc-f82da7d270d2bf27905b338f28622c3546ad9306.tar.bz2 |
(simplify_rtx, case SUBREG): For SUBREG of a constant,
use <= instead of < when comparing mode sizes.
(force_to_mode, case NOT): Use full mask inside the NOT operation.
From-SVN: r10814
-rw-r--r-- | gcc/combine.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 9f1086b..d37fcb2 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -3307,7 +3307,7 @@ simplify_rtx (x, op0_mode, last, in_dest) always valid. On a big-endian machine, it's valid only if the constant's mode fits in one word. */ if (CONSTANT_P (SUBREG_REG (x)) && subreg_lowpart_p (x) - && GET_MODE_SIZE (mode) < GET_MODE_SIZE (op0_mode) + && GET_MODE_SIZE (mode) <= GET_MODE_SIZE (op0_mode) && (! WORDS_BIG_ENDIAN || GET_MODE_BITSIZE (op0_mode) <= BITS_PER_WORD)) return gen_lowpart_for_combine (mode, SUBREG_REG (x)); @@ -6171,6 +6171,10 @@ force_to_mode (x, mode, mask, reg, just_select) return force_to_mode (x, mode, mask, reg, next_select); } + /* (and (not FOO) CONST) is (not (or FOO (not CONST))), so we must + use the full mask inside the NOT. */ + mask = fuller_mask; + unop: op0 = gen_lowpart_for_combine (op_mode, force_to_mode (XEXP (x, 0), mode, mask, |