aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2005-04-16 21:42:26 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2005-04-16 21:42:26 +0000
commit92750a3929a3974cd0d4baa6c2da3258a2d43b2b (patch)
treec27abe6e884efe6fc4512ac1e821f186a8dec173 /gcc/loop.c
parent29836d07d5175c17b66ded6083283117b26f13a7 (diff)
downloadgcc-92750a3929a3974cd0d4baa6c2da3258a2d43b2b.zip
gcc-92750a3929a3974cd0d4baa6c2da3258a2d43b2b.tar.gz
gcc-92750a3929a3974cd0d4baa6c2da3258a2d43b2b.tar.bz2
re PR target/20126 (Inlined memcmp makes one argument null on entry)
PR target/20126 * loop.c (loop_givs_rescan): Handle non-replaceable (plus (reg) (const)). From-SVN: r98238
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index f432e68..005560a 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -5488,6 +5488,15 @@ loop_givs_rescan (struct loop *loop, struct iv_class *bl, rtx *reg_map)
loop_insn_emit_before (loop, 0, v->insn,
gen_move_insn (*v->location,
v->new_reg));
+ else if (GET_CODE (*v->location) == PLUS
+ && REG_P (XEXP (*v->location, 0))
+ && CONSTANT_P (XEXP (*v->location, 1)))
+ loop_insn_emit_before (loop, 0, v->insn,
+ gen_move_insn (XEXP (*v->location, 0),
+ gen_rtx_MINUS
+ (GET_MODE (*v->location),
+ v->new_reg,
+ XEXP (*v->location, 1))));
else
{
/* If it wasn't a reg, create a pseudo and use that. */