aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/ira.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/ira.c')
-rw-r--r--gcc-4.9/gcc/ira.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/ira.c b/gcc-4.9/gcc/ira.c
index 4d91d2196..c0e8a0d23 100644
--- a/gcc-4.9/gcc/ira.c
+++ b/gcc-4.9/gcc/ira.c
@@ -5347,7 +5347,17 @@ ira (FILE *f)
ira_allocno_iterator ai;
FOR_EACH_ALLOCNO (a, ai)
- ALLOCNO_REGNO (a) = REGNO (ALLOCNO_EMIT_DATA (a)->reg);
+ {
+ int old_regno = ALLOCNO_REGNO (a);
+ int new_regno = REGNO (ALLOCNO_EMIT_DATA (a)->reg);
+
+ ALLOCNO_REGNO (a) = new_regno;
+
+ if (old_regno != new_regno)
+ setup_reg_classes (new_regno, reg_preferred_class (old_regno),
+ reg_alternate_class (old_regno),
+ reg_allocno_class (old_regno));
+ }
}
else
{