diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2012-11-28 17:42:39 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2012-11-28 17:42:39 +0000 |
commit | c656b86b8dd3be8a0359aeccf8285dc7b4b065c9 (patch) | |
tree | 2f88c081c22debed675f29e747823d688a835fff /gcc/lra-assigns.c | |
parent | 77e21230ea18da36f75f83b1428d659ecbbbbd9c (diff) | |
download | gcc-c656b86b8dd3be8a0359aeccf8285dc7b4b065c9.zip gcc-c656b86b8dd3be8a0359aeccf8285dc7b4b065c9.tar.gz gcc-c656b86b8dd3be8a0359aeccf8285dc7b4b065c9.tar.bz2 |
re PR rtl-optimization/55512 (Various LRA ICEs with inline-asm)
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.
From-SVN: r193901
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 8b7dcff..b1d1810 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); |