From b49a9ef634ce7ffec51903b85a5d2a6d7f339848 Mon Sep 17 00:00:00 2001 From: vmakarov Date: Wed, 28 Nov 2012 17:42:39 +0000 Subject: 2012-11-28 Vladimir Makarov PR rtl-optimization/55512 * lra-assigns.c (assign_by_spills): Assigned arbitrary hard regs to failed reload pseudos instead of changing asm pattern. * lra-constraints.c (MAX_CONSTRAINT_ITERATION_NUMBER): Increase value. 2012-11-28 Vladimir Makarov PR rtl-optimization/55512 * gcc.target/i386/pr55512-[1234].c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193901 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/lra-assigns.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'gcc/lra-assigns.c') diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index 8b7dcffb523..b1d18102dc2 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -1220,8 +1220,17 @@ assign_by_spills (void) bitmap_initialize (&failed_reload_insns, ®_obstack); for (i = 0; i < nfails; i++) - bitmap_ior_into (&failed_reload_insns, - &lra_reg_info[sorted_pseudos[i]].insn_bitmap); + { + regno = sorted_pseudos[i]; + bitmap_ior_into (&failed_reload_insns, + &lra_reg_info[regno].insn_bitmap); + /* Assign an arbitrary hard register of regno class to + avoid further trouble with the asm insns. */ + bitmap_clear_bit (&all_spilled_pseudos, regno); + assign_hard_regno + (ira_class_hard_regs[regno_allocno_class_array[regno]][0], + regno); + } EXECUTE_IF_SET_IN_BITMAP (&failed_reload_insns, 0, u, bi) { insn = lra_insn_recog_data[u]->insn; @@ -1230,9 +1239,6 @@ assign_by_spills (void) asm_p = true; error_for_asm (insn, "% operand has impossible constraints"); - /* Avoid further trouble with this insn. */ - PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx); - lra_invalidate_insn_data (insn); } } lra_assert (asm_p); -- cgit v1.2.1