diff options
author | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-30 22:06:19 +0000 |
---|---|---|
committer | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-30 22:06:19 +0000 |
commit | 83b6c9dbe59299f469b81f88a1de57609e1257f9 (patch) | |
tree | fb16f209e57818115437c91ffbfdfdfbcbf18c3d /gcc/function.c | |
parent | 5cb06fbbebd8155782baf71fdb146fda920f9a95 (diff) | |
download | gcc-83b6c9dbe59299f469b81f88a1de57609e1257f9.tar.gz |
2009-11-30 Steve Ellcey <sje@cup.hp.com>
Jakub Jelinek <jakub@redhat.com>
* function.c (instantiate_virtual_regs_in_insn): Copy to new reg
before forcing mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154843 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c index 88e036c0857..b8042d08551 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1598,7 +1598,13 @@ instantiate_virtual_regs_in_insn (rtx insn) if (!safe_insn_predicate (insn_code, i, x)) { start_sequence (); - x = force_reg (insn_data[insn_code].operand[i].mode, x); + if (REG_P (x)) + { + gcc_assert (REGNO (x) <= LAST_VIRTUAL_REGISTER); + x = copy_to_reg (x); + } + else + x = force_reg (insn_data[insn_code].operand[i].mode, x); seq = get_insns (); end_sequence (); if (seq) |