diff options
author | renlin <renlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-19 15:15:51 +0000 |
---|---|---|
committer | renlin <renlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-19 15:15:51 +0000 |
commit | aec08e4dc853a1460f6965fb75fdbacb517bd868 (patch) | |
tree | 7e28af5fb6d3e43de7aca4a46ff43b6e5cfaf21a /gcc/ira.c | |
parent | 50c933a3f52a2ff05ca6216f937cd1e2500b4826 (diff) | |
download | gcc-aec08e4dc853a1460f6965fb75fdbacb517bd868.tar.gz |
2014-11-19 Renlin Li <Renlin.Li@arm.com>
PR middle-end/63762
* ira.c (ira): Update preferred class.
* gcc.dg/pr63762.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217783 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ira.c b/gcc/ira.c index 9c9e71d1be1..e610d358177 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -5263,7 +5263,18 @@ 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 { |