diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-05 17:32:10 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-05 17:32:10 -0400 |
commit | dc3e17add0fcce3988cd981e161aa983139743e9 (patch) | |
tree | 9175cc3abdc6da1c184acbe13998b27a2054cf91 | |
parent | 7877bbb364b78492cb70bffb72c2eea65bbe3b04 (diff) | |
download | gcc-dc3e17add0fcce3988cd981e161aa983139743e9.zip gcc-dc3e17add0fcce3988cd981e161aa983139743e9.tar.gz gcc-dc3e17add0fcce3988cd981e161aa983139743e9.tar.bz2 |
(num_sign_bit_copies, case SUBREG): Properly compute the number of
sign bit copies of SUBREGs of promoted objects.
From-SVN: r4341
-rw-r--r-- | gcc/combine.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 9e14ea6..cd5936d 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1,5 +1,5 @@ /* Optimize by combining instructions for GNU compiler. - Copyright (C) 1987, 1988, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1988, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU CC. @@ -6519,8 +6519,8 @@ num_sign_bit_copies (x, mode) high-order bits are known to be sign bit copies. */ if (SUBREG_PROMOTED_VAR_P (x) && ! SUBREG_PROMOTED_UNSIGNED_P (x)) - return (GET_MODE_BITSIZE (mode) - GET_MODE_BITSIZE (GET_MODE (x)) - + num_sign_bit_copies (SUBREG_REG (x), GET_MODE (x))); + return MAX (bitwidth - GET_MODE_BITSIZE (GET_MODE (x)) + 1, + num_sign_bit_copies (SUBREG_REG (x), mode)); /* For a smaller object, just ignore the high bits. */ if (bitwidth <= GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x)))) |