From c61fe0cc565a305a3014129b197aa042ce86030f Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Fri, 9 Jan 2015 06:19:32 +0000 Subject: [PATCH] re PR target/64348 (Case scal-to-vec1.c failed on arm-linux-gnueabi with -fPIC) 2015-01-09 Kito Cheng PR rtl-optimization/64348 * lra-constraints.c (split_reg): Fix caller-save store/restore instruction generation. From-SVN: r219375 --- gcc/ChangeLog | 6 ++++++ gcc/lra-constraints.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c38f07aca59..e1db810abf8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-01-09 Kito Cheng + + PR rtl-optimization/64348 + * lra-constraints.c (split_reg): Fix caller-save store/restore + instruction generation. + 2015-01-08 John David Anglin PR gcov-profile/61790 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 96b10a19cb5..f8bc12fbfdf 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -4918,15 +4918,14 @@ split_reg (bool before_p, int original_regno, rtx_insn *insn, reg_renumber[REGNO (new_reg)] = hard_regno; } save = emit_spill_move (true, new_reg, original_reg); - if (NEXT_INSN (save) != NULL_RTX) + if (NEXT_INSN (save) != NULL_RTX && !call_save_p) { - lra_assert (! call_save_p); if (lra_dump_file != NULL) { fprintf (lra_dump_file, - " Rejecting split %d->%d resulting in > 2 %s save insns:\n", - original_regno, REGNO (new_reg), call_save_p ? "call" : ""); + " Rejecting split %d->%d resulting in > 2 save insns:\n", + original_regno, REGNO (new_reg)); dump_rtl_slim (lra_dump_file, save, NULL, -1, 0); fprintf (lra_dump_file, " ))))))))))))))))))))))))))))))))))))))))))))))))\n"); @@ -4934,15 +4933,14 @@ split_reg (bool before_p, int original_regno, rtx_insn *insn, return false; } restore = emit_spill_move (false, new_reg, original_reg); - if (NEXT_INSN (restore) != NULL_RTX) + if (NEXT_INSN (restore) != NULL_RTX && !call_save_p) { - lra_assert (! call_save_p); if (lra_dump_file != NULL) { fprintf (lra_dump_file, " Rejecting split %d->%d " - "resulting in > 2 %s restore insns:\n", - original_regno, REGNO (new_reg), call_save_p ? "call" : ""); + "resulting in > 2 restore insns:\n", + original_regno, REGNO (new_reg)); dump_rtl_slim (lra_dump_file, restore, NULL, -1, 0); fprintf (lra_dump_file, " ))))))))))))))))))))))))))))))))))))))))))))))))\n"); -- 2.30.2