The following patch solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49154 for SPARC. SPARC FPCC
registers were excluded from pressure classes because the movement
between them is costly. Therefore the assert was triggered again.
Common logic says that it should be a pressure class because the
registers are common and that is attributed that the class has no
subclasses.
The patch was bootstrapped on x86-64 and teststed on the same targets
(about 10 of them) + regular SPARC (without soft floating point).
Ok to commit?
2011-05-25 Vladimir Makarov <vmaka...@redhat.com>
PR rtl-optimization/49154
* ira.c (setup_pressure_classes): Process class without sublcasses
as a candidate for pressure classes.
Index: ira.c
===================================================================
--- ira.c (revision 174219)
+++ ira.c (working copy)
@@ -799,7 +799,12 @@ setup_pressure_classes (void)
{
if (ira_available_class_regs[cl] == 0)
continue;
- if (ira_available_class_regs[cl] != 1)
+ if (ira_available_class_regs[cl] != 1
+ /* A register class without subclasses may contain a few
+ hard registers and movement between them is costly
+ (e.g. SPARC FPCC registers). We still should consider it
+ as a candidate for a pressure class. */
+ && alloc_reg_class_subclasses[cl][0] != LIM_REG_CLASSES)
{
/* Check that the moves between any hard registers of the
current class are not more expensive for a legal mode