aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2004-10-28 12:47:21 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2004-10-28 12:47:21 +0000
commitfd326ba823f7a8cbb2f7c47a2a3d15a8e098a976 (patch)
treea9bda2464d7b200ebd679487ccda3fef16f416b1 /gcc/recog.c
parent4af46a327e490e1a24a353bc55f0d64631ba85de (diff)
downloadgcc-fd326ba823f7a8cbb2f7c47a2a3d15a8e098a976.zip
gcc-fd326ba823f7a8cbb2f7c47a2a3d15a8e098a976.tar.gz
gcc-fd326ba823f7a8cbb2f7c47a2a3d15a8e098a976.tar.bz2
re PR target/15286 (ICE cause by reload)
PR target/15286 * final.c (alter_subreg): Compute correct offset to use with paradoxical SUBREGs of memory operands. * recog.c (general_operand): Allow paradoxical SUBREGs of memory operands after reload. * simplify-rtx.c (simplify_gen_subreg): Fail if simplify_subreg has failed when passed a hard register. From-SVN: r89752
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 61e1186..eeb37af 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -936,8 +936,10 @@ general_operand (rtx op, enum machine_mode mode)
#ifdef INSN_SCHEDULING
/* On machines that have insn scheduling, we want all memory
- reference to be explicit, so outlaw paradoxical SUBREGs. */
- if (MEM_P (sub)
+ reference to be explicit, so outlaw paradoxical SUBREGs.
+ However, we must allow them after reload so that they can
+ get cleaned up by cleanup_subreg_operands. */
+ if (!reload_completed && MEM_P (sub)
&& GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (sub)))
return 0;
#endif