The following patch fixes PR64172. The details of the problem can be
found on
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64172
The patch was bootstrapped and tested on x86-64. I also checked
SPEC2000 for the patch. There is only one code change on sixtrack.
And the patch improves sixtrack performance by 0.8%.
I decided not to include the testcase as it is copyrighted.
Committed as rev. 220877.
2015-02-20 Vladimir Makarov <vmaka...@redhat.com>
PR target/64172
* ira-color.c (color_pass): Prevent splitting multi-register
pseudos.
Index: ira-color.c
===================================================================
--- ira-color.c (revision 220544)
+++ ira-color.c (working copy)
@@ -3275,7 +3275,11 @@ color_pass (ira_loop_tree_node_t loop_tr
&& (loop_tree_node->reg_pressure[pclass]
<= ira_class_hard_regs_num[pclass]))
|| (pic_offset_table_rtx != NULL
- && regno == (int) REGNO (pic_offset_table_rtx)))
+ && regno == (int) REGNO (pic_offset_table_rtx))
+ /* Avoid overlapped multi-registers. Moves between them
+ might result in wrong code generation. */
+ || (hard_regno >= 0
+ && ira_reg_class_max_nregs[pclass][mode] > 1))
{
if (! ALLOCNO_ASSIGNED_P (subloop_allocno))
{