summaryrefslogtreecommitdiffstats
path: root/gcc/explow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index 11c2a477b84..2e8f6488501 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -446,7 +446,12 @@ memory_address (enum machine_mode mode, rtx x)
in certain cases. This is not necessary since the code
below can handle all possible cases, but machine-dependent
transformations can make better code. */
- LEGITIMIZE_ADDRESS (x, oldx, mode, done);
+ {
+ rtx orig_x = x;
+ x = targetm.legitimize_address (x, oldx, mode);
+ if (orig_x != x && memory_address_p (mode, x))
+ goto done;
+ }
/* PLUS and MULT can appear in special ways
as the result of attempts to make an address usable for indexing.
OpenPOWER on IntegriCloud