summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-19 11:51:32 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-19 11:51:32 +0000
commit9e238359714b4bb599d27e4e91dc127aed5731a7 (patch)
treef1349933ad673ebcd68c11621455ddb300fa4a77
parent9a19db4c6735cf428c76d487106f692760c1784d (diff)
downloadgcc-9e238359714b4bb599d27e4e91dc127aed5731a7.tar.gz
* recog.c (general_operand): Modify last change to allow it if reload
has completed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42309 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/recog.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a086e993ef4..d8598505427 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Sat May 19 07:53:42 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * recog.c (general_operand): Modify last change to allow it if reload
+ has completed.
+
Sat May 19 10:23:54 CEST 2001 Jan Hubicka <jh@suse.cz>
* recog.c (general_operand): Prohibit nonzero subreg bytes on
diff --git a/gcc/recog.c b/gcc/recog.c
index 5e78336ea02..833a12253a7 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -961,8 +961,12 @@ general_operand (op, mode)
#endif
/* Avoid memories with nonzero SUBREG_BYTE, as offsetting the memory
may result in incorrect reference. We should simplify all valid
- subregs of MEM anyway. */
- if (SUBREG_BYTE (op) && GET_CODE (SUBREG_REG (op)) == MEM)
+ subregs of MEM anyway. But allow this after reload because we
+ might be called from cleanup_subreg_operands.
+
+ ??? This is a kludge. */
+ if (!reload_completed && SUBREG_BYTE (op) != 0
+ && GET_CODE (SUBREG_REG (op)) == MEM)
return 0;
op = SUBREG_REG (op);