Commit 6d80a854 by Eric Botcazou Committed by Richard Henderson

re PR middle-end/7153 (bad operands for 'movsbl' error)

        PR optimization/7153
        * regmove.c (optimize_reg_copy_3): Don't optimize if the register
        dies in more than one insn.

From-SVN: r55468
parent 0cb45d38
2002-07-15 Eric Botcazou <ebotcazou@multimania.com>
PR optimization/7153
* regmove.c (optimize_reg_copy_3): Don't optimize if the register
dies in more than one insn.
2002-07-15 Jason Thorpe <thorpej@wasabisystems.com>
* config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Remove.
......
......@@ -664,6 +664,7 @@ optimize_reg_copy_3 (insn, dest, src)
if (src_no < FIRST_PSEUDO_REGISTER
|| dst_no < FIRST_PSEUDO_REGISTER
|| ! find_reg_note (insn, REG_DEAD, src_reg)
|| REG_N_DEATHS (src_no) != 1
|| REG_N_SETS (src_no) != 1)
return;
for (p = PREV_INSN (insn); p && ! reg_set_p (src_reg, p); p = PREV_INSN (p))
......
/* PR optimization/7153 */
/* Verify that GCC doesn't promote a register when its
lifetime is not limited to one basic block. */
void f(char);
void g(void);
void scale(void)
{
int width;
char bytes;
char *src;
if (width)
{
bytes = *src;
g();
width *= bytes;
}
f(bytes);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment