diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-21 11:35:10 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-21 11:35:10 +0000 |
commit | a6b1267b51a4bdeada7cfb259394872699de0554 (patch) | |
tree | 431dc6bf5789b9644883f3f5629c6b90c7570170 /gcc/combine.c | |
parent | dd3e6a1a31ebaef674b83f35aa3279ae3179938f (diff) | |
download | gcc-a6b1267b51a4bdeada7cfb259394872699de0554.tar.gz |
* combine.c (nonzero_bits): For paradoxical subregs, take
LOAD_EXTENDED_OP into account.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19928 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 68c084f047d..14da483ccd1 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7693,15 +7693,23 @@ nonzero_bits (x, mode) { nonzero &= nonzero_bits (SUBREG_REG (x), mode); -#ifndef WORD_REGISTER_OPERATIONS - /* On many CISC machines, accessing an object in a wider mode - causes the high-order bits to become undefined. So they are - not known to be zero. */ - if (GET_MODE_SIZE (GET_MODE (x)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) - nonzero |= (GET_MODE_MASK (GET_MODE (x)) - & ~ GET_MODE_MASK (GET_MODE (SUBREG_REG (x)))); +#if defined (WORD_REGISTER_OPERATIONS) && defined (LOAD_EXTEND_OP) + /* If this is a typical RISC machine, we only have to worry + about the way loads are extended. */ + if (LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) == SIGN_EXTEND + ? (nonzero + & (1L << (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) - 1))) + : LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) != ZERO_EXTEND) #endif + { + /* On many CISC machines, accessing an object in a wider mode + causes the high-order bits to become undefined. So they are + not known to be zero. */ + if (GET_MODE_SIZE (GET_MODE (x)) + > GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) + nonzero |= (GET_MODE_MASK (GET_MODE (x)) + & ~ GET_MODE_MASK (GET_MODE (SUBREG_REG (x)))); + } } break; |