diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-11-11 21:52:49 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-11-11 21:52:49 +0000 |
commit | 0207fa9006aa57843f99eb17abb0a04c4cc42b8f (patch) | |
tree | e46e95eb2fb00a9a4043e23fc4ae9d095ad324b4 /gcc/recog.c | |
parent | 92eba4000df906bae1d3be6d9c2047d6b3f8cac2 (diff) | |
download | gcc-0207fa9006aa57843f99eb17abb0a04c4cc42b8f.tar.gz |
re PR rtl-optimization/55247 (internal compiler error: Max. number of generated reload insns per insn is achieved (90))
PR rtl-optimization/55247
PR middle-end/55259
* emit-rtl.c (adjust_address_1): If POINTERS_EXTEND_UNSIGNED > 0,
handle ZERO_EXTEND.
* recog.c (offsettable_address_addr_space_p): Likewise.
From-SVN: r193415
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index ee68e305256..47e7f75e1dd 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -1942,6 +1942,9 @@ offsettable_address_addr_space_p (int strictp, enum machine_mode mode, rtx y, (strictp ? strict_memory_address_addr_space_p : memory_address_addr_space_p); unsigned int mode_sz = GET_MODE_SIZE (mode); +#ifdef POINTERS_EXTEND_UNSIGNED + enum machine_mode pointer_mode = targetm.addr_space.pointer_mode (as); +#endif if (CONSTANT_ADDRESS_P (y)) return 1; @@ -1991,6 +1994,15 @@ offsettable_address_addr_space_p (int strictp, enum machine_mode mode, rtx y, z = gen_rtx_LO_SUM (GET_MODE (y), XEXP (y, 0), plus_constant (GET_MODE (y), XEXP (y, 1), mode_sz - 1)); +#ifdef POINTERS_EXTEND_UNSIGNED + /* Likewise for a ZERO_EXTEND from pointer_mode. */ + else if (POINTERS_EXTEND_UNSIGNED > 0 + && GET_CODE (y) == ZERO_EXTEND + && GET_MODE (XEXP (y, 0)) == pointer_mode) + z = gen_rtx_ZERO_EXTEND (GET_MODE (y), + plus_constant (pointer_mode, XEXP (y, 0), + mode_sz - 1)); +#endif else z = plus_constant (GET_MODE (y), y, mode_sz - 1); |