summaryrefslogtreecommitdiff
path: root/gcc/ira-emit.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-10-16 03:29:14 +0200
committerH.J. Lu <hjl@gcc.gnu.org>2008-10-15 18:29:14 -0700
commitc39a4ad7a8e2e494432980bdaff5d4b378b50bb2 (patch)
treea896a6646214dd0d75dba2ada8d0e625f7752e14 /gcc/ira-emit.c
parentaac375ddfb69c8c4c62f9b8a19a2971bcd7d1b7b (diff)
downloadgcc-c39a4ad7a8e2e494432980bdaff5d4b378b50bb2.tar.gz
ira-emit.c (change_regs): Return false when replacing reg by itself.
2008-10-15 Jan Hubicka <jh@suse.cz> * ira-emit.c (change_regs): Return false when replacing reg by itself. From-SVN: r141163
Diffstat (limited to 'gcc/ira-emit.c')
-rw-r--r--gcc/ira-emit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ira-emit.c b/gcc/ira-emit.c
index 7fdaefb52e5..a6a7582f519 100644
--- a/gcc/ira-emit.c
+++ b/gcc/ira-emit.c
@@ -137,6 +137,7 @@ change_regs (rtx *loc)
int i, regno, result = false;
const char *fmt;
enum rtx_code code;
+ rtx reg;
if (*loc == NULL_RTX)
return false;
@@ -151,7 +152,10 @@ change_regs (rtx *loc)
return false;
if (ira_curr_regno_allocno_map[regno] == NULL)
return false;
- *loc = ALLOCNO_REG (ira_curr_regno_allocno_map[regno]);
+ reg = ALLOCNO_REG (ira_curr_regno_allocno_map[regno]);
+ if (reg == *loc)
+ return false;
+ *loc = reg;
return true;
}