On 02/05/15 14:36, sa...@hederstierna.com wrote:
Hi
When reviewing some code from LRA, I just saw some lines that looked a bit
strange,
could it be a possible typo perhaps?
The file "lra.c" from GC5 master branch current date
Line 469:
/* Try x = index_scale; x = x + disp; x = x + base. */
last = get_last_insn ();
rtx_insn *move_insn = emit_move_insn (x, index_scale);
ok_p = false;
if (recog_memoized (move_insn) >= 0)
{
rtx insn = emit_add2_insn (x, disp);
if (insn != NULL_RTX)
{
insn = emit_add2_insn (x, disp);
if (insn != NULL_RTX)
ok_p = true;
}
}
Shouldn't the code be as the comment suggest to in the second call to
emit_add2_insn use 'base' ?
- insn = emit_add2_insn (x, disp);
+ insn = emit_add2_insn (x, base);
Maybe the code is right, I tried to mail vmakarov, some months ago, but did not
get any reply.
But it looks like I typo, so I just wanted to verify it so its not a bug,
It looks like a bug to me.
Can you please make that change in a local tree and bootstrap/regression
test it?
jeff