From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6PXE-0003ha-A5 for qemu-devel@nongnu.org; Mon, 05 Aug 2013 14:29:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6PX8-0001A1-EE for qemu-devel@nongnu.org; Mon, 05 Aug 2013 14:29:36 -0400 Received: from mail-qa0-x230.google.com ([2607:f8b0:400d:c00::230]:52908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6PX7-00019f-Dt for qemu-devel@nongnu.org; Mon, 05 Aug 2013 14:29:30 -0400 Received: by mail-qa0-f48.google.com with SMTP id o19so1147366qap.7 for ; Mon, 05 Aug 2013 11:29:29 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 5 Aug 2013 08:28:36 -1000 Message-Id: <1375727330-30515-2-git-send-email-rth@twiddle.net> In-Reply-To: <1375727330-30515-1-git-send-email-rth@twiddle.net> References: <1375727330-30515-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH for-next 01/15] 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: "Vassili Karpov (malc)" , Richard Henderson 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 0678de2..0e3147b 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -508,7 +508,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.3.1