diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-03 17:10:48 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-03 17:10:48 +0000 |
commit | 0c34fe7d298fcfd7f4459b196e1020ed73c62370 (patch) | |
tree | cd3544e7b5842efabe947bbaaa036b6c1b9dfa8f /gcc/combine.c | |
parent | e0c2d630c96f18a78f21619b0e1ced8383073a50 (diff) | |
download | gcc-0c34fe7d298fcfd7f4459b196e1020ed73c62370.tar.gz |
* combine.c (simplify_set): Don't move a subreg in SET_SRC to
SET_DEST if WORD_REGISTER_OPERATIONS is not defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67388 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 79f0226e8cd..c47065568fd 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5238,17 +5238,18 @@ simplify_set (x) SUBST (SET_SRC (x), src); } +#ifdef WORD_REGISTER_OPERATIONS /* If we have (set x (subreg:m1 (op:m2 ...) 0)) with OP being some operation, and X being a REG or (subreg (reg)), we may be able to convert this to (set (subreg:m2 x) (op)). - We can always do this if M1 is narrower than M2 because that means that - we only care about the low bits of the result. + On a machine where WORD_REGISTER_OPERATIONS is defined, this + transformation is safe as long as M1 and M2 have the same number + of words. - However, on machines without WORD_REGISTER_OPERATIONS defined, we cannot - perform a narrower operation than requested since the high-order bits will - be undefined. On machine where it is defined, this transformation is safe - as long as M1 and M2 have the same number of words. */ + However, on a machine without WORD_REGISTER_OPERATIONS defined, + we cannot apply this transformation because it would create a + paradoxical subreg in SET_DEST. */ if (GET_CODE (src) == SUBREG && subreg_lowpart_p (src) && GET_RTX_CLASS (GET_CODE (SUBREG_REG (src))) != 'o' @@ -5256,10 +5257,6 @@ simplify_set (x) / UNITS_PER_WORD) == ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (src))) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)) -#ifndef WORD_REGISTER_OPERATIONS - && (GET_MODE_SIZE (GET_MODE (src)) - < GET_MODE_SIZE (GET_MODE (SUBREG_REG (src)))) -#endif #ifdef CANNOT_CHANGE_MODE_CLASS && ! (GET_CODE (dest) == REG && REGNO (dest) < FIRST_PSEUDO_REGISTER && REG_CANNOT_CHANGE_MODE_P (REGNO (dest), @@ -5277,6 +5274,7 @@ simplify_set (x) src = SET_SRC (x), dest = SET_DEST (x); } +#endif #ifdef HAVE_cc0 /* If we have (set (cc0) (subreg ...)), we try to remove the subreg |