aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2012-09-26 13:46:29 +0000
committerGeorg-Johann Lay <avr@gjlay.de>2012-09-26 13:46:29 +0000
commit4b27ef5aac6291d32958be9246329eb6cc970cc7 (patch)
tree91a9229d2e7d90865629ad03c4b391936c79877e /gcc/simplify-rtx.c
parente258077ab05443b9eaeca0cfafa9d9384c23f8b6 (diff)
PR middle-end/54635
* doc/tm.texi.in (TARGET_MODE_DEPENDENT_ADDRESS_P): Document new parameter addrspace. * doc/tm.texi: Regenerate. * target.def (mode_dependent_address_p): Add addr_space_t parameter. * targhooks.h (default_mode_dependent_address_p): Ditto. * targhooks.c (default_mode_dependent_address_p): Ditto. * expr.c (convert_move): Pass address space to mode_dependent_address_p. * combine.c (combine_simplify_rtx): Ditto. (make_extraction): Ditto. (simplify_shift_const_1): Ditto. (gen_lowpart_for_combine): Ditto. * lower-subreg.c (simple_move_operand): Ditto. * recog.c (simplify_while_replacing): Ditto. (offsettable_address_addr_space_p): Ditto. (mode_dependent_address_p): Ditto. * simplify-rtx.c (simplify_unary_operation_1): Ditto. (simplify_subreg): Ditto. * config/m68k/m68k.md: Ditto. * config/vax/vax.md: Ditto. * config/vax/constraints.md (Q): Ditto. * config/vax/predicates.md (indexed_memory_operand): Ditto. * config/alpha/alpha.c (alpha_mode_dependent_address_p): Add unused addr_space_t parameter. * config/avr/avr.c (avr_mode_dependent_address_p): Ditto. * config/h8300/h8300.c (h8300_mode_dependent_address_p): Ditto. * config/m32r/m32r.c (m32r_mode_dependent_address_p): Ditto. * config/rs6000/rs6000.c (rs6000_mode_dependent_address_p): Ditto. * config/rx/rx.c (rx_mode_dependent_address_p): Ditto. * config/sparc/sparc.c (sparc_mode_dependent_address_p): Ditto. * config/stormy16/stormy16.c (xstormy16_mode_dependent_address_p): Ditto. * config/vax/vax.c (vax_mode_dependent_address_p): Ditto. * config/xtensa/xtensa.c (xtensa_mode_dependent_address_p): Ditto. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191761 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 97a9330d156..6b4b9f05d65 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -874,7 +874,7 @@ simplify_unary_operation_1 (enum rtx_code code, enum machine_mode mode, rtx op)
if we are not changing the meaning of the address. */
if (GET_CODE (op) == MEM
&& !MEM_VOLATILE_P (op)
- && !mode_dependent_address_p (XEXP (op, 0)))
+ && !mode_dependent_address_p (XEXP (op, 0), MEM_ADDR_SPACE (op)))
return rtl_hooks.gen_lowpart_no_emit (mode, op);
break;
@@ -5615,7 +5615,7 @@ simplify_subreg (enum machine_mode outermode, rtx op,
or if we would be widening it. */
if (MEM_P (op)
- && ! mode_dependent_address_p (XEXP (op, 0))
+ && ! mode_dependent_address_p (XEXP (op, 0), MEM_ADDR_SPACE (op))
/* Allow splitting of volatile memory references in case we don't
have instruction to move the whole thing. */
&& (! MEM_VOLATILE_P (op)
@@ -5773,7 +5773,8 @@ simplify_subreg (enum machine_mode outermode, rtx op,
&& (INTVAL (XEXP (op, 1)) % GET_MODE_BITSIZE (outermode)) == 0
&& INTVAL (XEXP (op, 1)) > 0
&& INTVAL (XEXP (op, 1)) < GET_MODE_BITSIZE (innermode)
- && ! mode_dependent_address_p (XEXP (XEXP (op, 0), 0))
+ && ! mode_dependent_address_p (XEXP (XEXP (op, 0), 0),
+ MEM_ADDR_SPACE (XEXP (op, 0)))
&& ! MEM_VOLATILE_P (XEXP (op, 0))
&& byte == subreg_lowpart_offset (outermode, innermode)
&& (GET_MODE_SIZE (outermode) >= UNITS_PER_WORD