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
This commit is contained in:
Jan Hubicka 2008-10-16 03:29:14 +02:00 committed by H.J. Lu
parent aac375ddfb
commit c39a4ad7a8
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2008-10-15 Jan Hubicka <jh@suse.cz>
* ira-emit.c (change_regs): Return false when replacing reg by
itself.
2008-10-14 Vladimir Makarov <vmakarov@redhat.com>
PR target/37633

View file

@ -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;
}