aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/postreload.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/postreload.c')
-rw-r--r--gcc-4.9/gcc/postreload.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/postreload.c b/gcc-4.9/gcc/postreload.c
index 9bfffe5f4..797668b19 100644
--- a/gcc-4.9/gcc/postreload.c
+++ b/gcc-4.9/gcc/postreload.c
@@ -493,7 +493,13 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
continue;
for (l = v->locs; l; l = l->next)
- if (REG_P (l->loc))
+ if (REG_P (l->loc)
+ /* If postreload cse replace an expr in call insn with
+ frame pointer reg, we will end up getting call (...bp...),
+ this is wrong for frame pointer shrinkwrapping. */
+ && !(frame_pointer_partially_needed
+ && CALL_P (insn)
+ && REGNO (l->loc) == HARD_FRAME_POINTER_REGNUM))
SET_HARD_REG_BIT (equiv_regs[i], REGNO (l->loc));
}