Skip to content

Commit

Permalink
tcg-ppc: Avoid code for nop move
Browse files Browse the repository at this point in the history
While these are rare from code that's been through the optimizer,
it's not uncommon within the tcg backend.

Signed-off-by: Richard Henderson <rth@twiddle.net>
  • Loading branch information
rth7680 committed Sep 25, 2013
1 parent 619f90b commit 4b2b114
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tcg/ppc/tcg-target.c
Expand Up @@ -450,7 +450,9 @@ static const uint32_t tcg_to_bc[] = {

static void tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg)
{
tcg_out32 (s, OR | SAB (arg, ret, arg));
if (ret != arg) {
tcg_out32(s, OR | SAB(arg, ret, arg));
}
}

static void tcg_out_movi(TCGContext *s, TCGType type,
Expand Down

0 comments on commit 4b2b114

Please sign in to comment.