diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-28 17:42:39 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-28 17:42:39 +0000 |
commit | b49a9ef634ce7ffec51903b85a5d2a6d7f339848 (patch) | |
tree | 2f88c081c22debed675f29e747823d688a835fff /gcc/lra-assigns.c | |
parent | 47f71e87dea539f54769186d2de0668df79aa339 (diff) | |
download | gcc-b49a9ef634ce7ffec51903b85a5d2a6d7f339848.tar.gz |
2012-11-28 Vladimir Makarov <vmakarov@redhat.com>
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 <vmakarov@redhat.com>
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
Diffstat (limited to 'gcc/lra-assigns.c')
-rw-r--r-- | gcc/lra-assigns.c | 16 |
1 files changed, 11 insertions, 5 deletions
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, "%<asm%> 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); |