aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 447d972c340..72af39aa4f3 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3518,6 +3518,9 @@ fold_rtx (rtx x, rtx insn)
addr = addr_ent->const_rtx;
}
+ /* Call target hook to avoid the effects of -fpic etc.... */
+ addr = targetm.delegitimize_address (addr);
+
/* If address is constant, split it into a base and integer offset. */
if (GET_CODE (addr) == SYMBOL_REF || GET_CODE (addr) == LABEL_REF)
base = addr;