aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-05-21 11:35:10 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1998-05-21 12:35:10 +0100
commitb52ce03da5fcaf93480c6f0d95e9be500a97fb33 (patch)
tree431dc6bf5789b9644883f3f5629c6b90c7570170 /gcc/combine.c
parentd4dfe7d66cd2d6141684e2b686a4c3bc7bddbf39 (diff)
downloadgcc-b52ce03da5fcaf93480c6f0d95e9be500a97fb33.zip
gcc-b52ce03da5fcaf93480c6f0d95e9be500a97fb33.tar.gz
gcc-b52ce03da5fcaf93480c6f0d95e9be500a97fb33.tar.bz2
combine.c (nonzero_bits): For paradoxical subregs, take LOAD_EXTENDED_OP into account.
* combine.c (nonzero_bits): For paradoxical subregs, take LOAD_EXTENDED_OP into account. From-SVN: r19928
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 68c084f..14da483 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;