From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOrwR-0002Jk-Hc for qemu-devel@nongnu.org; Wed, 25 Sep 2013 12:28:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOrwL-00032q-NQ for qemu-devel@nongnu.org; Wed, 25 Sep 2013 12:27:55 -0400 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]:58544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOrwL-00032i-Fw for qemu-devel@nongnu.org; Wed, 25 Sep 2013 12:27:49 -0400 Received: by mail-pa0-f45.google.com with SMTP id rd3so63895pab.4 for ; Wed, 25 Sep 2013 09:27:48 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Wed, 25 Sep 2013 09:27:21 -0700 Message-Id: <1380126458-3247-5-git-send-email-rth@twiddle.net> In-Reply-To: <1380126458-3247-1-git-send-email-rth@twiddle.net> References: <1380126458-3247-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL 04/21] tcg-ppc: Avoid code for nop move List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: anthony@codemonkey.ws 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 --- tcg/ppc/tcg-target.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c index 24a8621..965108b 100644 --- a/tcg/ppc/tcg-target.c +++ b/tcg/ppc/tcg-target.c @@ -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, -- 1.8.1.4