diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-27 06:38:52 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-27 06:38:52 +0000 |
commit | 2db0b3527cdd32dc1bb494d18508dc4320a19f69 (patch) | |
tree | c7c3eab8c786f9630cce495ae3913a2d458e808d /gcc/ifcvt.c | |
parent | d0986467397b442d06f2d63557bbc3548919d783 (diff) | |
download | gcc-2db0b3527cdd32dc1bb494d18508dc4320a19f69.tar.gz |
2009-10-27 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 153581
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@153582 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 1ef2d21f903..d8d15a59be1 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -1329,11 +1329,15 @@ noce_try_cmove_arith (struct noce_if_info *if_info) /* ??? FIXME: Magic number 5. */ if (cse_not_expected && MEM_P (a) && MEM_P (b) + && MEM_ADDR_SPACE (a) == MEM_ADDR_SPACE (b) && if_info->branch_cost >= 5) { + enum machine_mode address_mode + = targetm.addr_space.address_mode (MEM_ADDR_SPACE (a)); + a = XEXP (a, 0); b = XEXP (b, 0); - x = gen_reg_rtx (Pmode); + x = gen_reg_rtx (address_mode); is_mem = 1; } @@ -1482,6 +1486,9 @@ noce_try_cmove_arith (struct noce_if_info *if_info) set_mem_align (tmp, MIN (MEM_ALIGN (if_info->a), MEM_ALIGN (if_info->b))); + gcc_assert (MEM_ADDR_SPACE (if_info->a) == MEM_ADDR_SPACE (if_info->b)); + set_mem_addr_space (tmp, MEM_ADDR_SPACE (if_info->a)); + noce_emit_move_insn (if_info->x, tmp); } else if (target != x) |