diff options
| author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-22 23:56:34 +0000 |
|---|---|---|
| committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-22 23:56:34 +0000 |
| commit | 56c918b166b24fb50fc5aa1e5853955872c0ac2a (patch) | |
| tree | b53937dbff310868363d7902d40a1327a0ded2f2 | |
| parent | 66694f6f696500d6cc49bba8f8fc6c9233c523b8 (diff) | |
| download | ppe42-gcc-56c918b166b24fb50fc5aa1e5853955872c0ac2a.tar.gz ppe42-gcc-56c918b166b24fb50fc5aa1e5853955872c0ac2a.zip | |
* combine.c (combine_simplify_rtx): When handling a SUBREG,
take SUBREG_WORD into account.
(if_then_else_cond): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30623 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/combine.c | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9adf365e72f..82f73ada28e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Nov 22 23:53:50 1999 J"orn Rennecke <amylaar@cygnus.co.uk> + + * combine.c (combine_simplify_rtx): When handling a SUBREG, + take SUBREG_WORD into account. + (if_then_else_cond): Likewise. + 1999-11-22 Jason Merrill <jason@casey.cygnus.com> * gmon.c, i386/gmon-sol2.c, sparc/gmon-sol2.c: Remove advertising diff --git a/gcc/combine.c b/gcc/combine.c index 4a1cb0ee62c..a853129da8f 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -3698,7 +3698,12 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) since we are saying that the high bits don't matter. */ if (CONSTANT_P (SUBREG_REG (x)) && GET_MODE (SUBREG_REG (x)) == VOIDmode && GET_MODE_SIZE (mode) > GET_MODE_SIZE (op0_mode)) - return SUBREG_REG (x); + { + if (GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) > UNITS_PER_WORD + && (WORDS_BIG_ENDIAN || SUBREG_WORD (x) != 0)) + return operand_subword (SUBREG_REG (x), SUBREG_WORD (x), 0, mode); + return SUBREG_REG (x); + } /* Note that we cannot do any narrowing for non-constants since we might have been counting on using the fact that some bits were @@ -7112,6 +7117,12 @@ if_then_else_cond (x, ptrue, pfalse) && 0 != (cond0 = if_then_else_cond (SUBREG_REG (x), &true0, &false0))) { + if (GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) > UNITS_PER_WORD + && (WORDS_BIG_ENDIAN || SUBREG_WORD (x) != 0)) + { + true0 = operand_subword (true0, SUBREG_WORD (x), 0, mode); + false0 = operand_subword (false0, SUBREG_WORD (x), 0, mode); + } *ptrue = force_to_mode (true0, mode, GET_MODE_MASK (mode), NULL_RTX, 0); *pfalse = force_to_mode (false0, mode, GET_MODE_MASK (mode), NULL_RTX, 0); |

