From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOrwc-0002Vt-Tp for qemu-devel@nongnu.org; Wed, 25 Sep 2013 12:28:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOrwW-00035u-VN for qemu-devel@nongnu.org; Wed, 25 Sep 2013 12:28:06 -0400 Received: from mail-pb0-x235.google.com ([2607:f8b0:400e:c01::235]:48177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOrwW-00035i-ND for qemu-devel@nongnu.org; Wed, 25 Sep 2013 12:28:00 -0400 Received: by mail-pb0-f53.google.com with SMTP id up15so6262518pbc.12 for ; Wed, 25 Sep 2013 09:27:59 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Wed, 25 Sep 2013 09:27:29 -0700 Message-Id: <1380126458-3247-13-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 12/21] tcg-ppc64: 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/ppc64/tcg-target.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 27a955b..357f8c1 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -509,7 +509,9 @@ static const uint32_t tcg_to_isel[] = { static inline 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 inline void tcg_out_rld(TCGContext *s, int op, TCGReg ra, TCGReg rs, -- 1.8.1.4