diff options
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r-- | gcc/lra-constraints.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 8fc2cb7..9e9539c 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -488,7 +488,11 @@ get_equiv (rtx x) || lra_get_regno_hard_regno (regno) >= 0) return x; if ((res = ira_reg_equiv[regno].memory) != NULL_RTX) - return res; + { + if (targetm.cannot_substitute_mem_equiv_p (res)) + return x; + return res; + } if ((res = ira_reg_equiv[regno].constant) != NULL_RTX) return res; if ((res = ira_reg_equiv[regno].invariant) != NULL_RTX) |