summaryrefslogtreecommitdiff
path: root/gcc/postreload.c
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-23 13:01:42 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-23 13:01:42 +0000
commita091e4f5c1a3d1c56ebd0ccf56f09342546170b5 (patch)
tree42529d1eb0ebe4cb9d1f1aaac576501e8e97de7d /gcc/postreload.c
parentd83f298ec8ac0fa640f4854d72ce45a9d08dc799 (diff)
downloadgcc-a091e4f5c1a3d1c56ebd0ccf56f09342546170b5.tar.gz
* doc/tm.texi: Insert some weasel words when LOAD_EXTEND_OP
may or may not return non-NIL. * postreload.c (reload_cse_simplify_operands): In LOAD_EXTEND_OP code, check CANNOT_CHANGE_MODE_CLASS git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76415 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r--gcc/postreload.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 5596d9c2782..6f567f07f9e 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -423,6 +423,15 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
|| GET_CODE (SET_SRC (set)) == ZERO_EXTEND
|| GET_CODE (SET_SRC (set)) == SIGN_EXTEND)
; /* Continue ordinary processing. */
+#ifdef CANNOT_CHANGE_MODE_CLASS
+ /* If the register cannot change mode to word_mode, it follows that
+ it cannot have been used in word_mode. */
+ else if (GET_CODE (SET_DEST (set)) == REG
+ && CANNOT_CHANGE_MODE_CLASS (GET_MODE (SET_DEST (set)),
+ word_mode,
+ REGNO_REG_CLASS (REGNO (SET_DEST (set)))))
+ ; /* Continue ordinary processing. */
+#endif
/* If this is a straight load, make the extension explicit. */
else if (GET_CODE (SET_DEST (set)) == REG
&& recog_data.n_operands == 2