From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM33K-00054d-2i for qemu-devel@nongnu.org; Wed, 10 Oct 2012 16:38:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TM33J-0000vs-4w for qemu-devel@nongnu.org; Wed, 10 Oct 2012 16:38:50 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:43957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TM33I-0000vi-Qd for qemu-devel@nongnu.org; Wed, 10 Oct 2012 16:38:49 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so1096140pbb.4 for ; Wed, 10 Oct 2012 13:38:48 -0700 (PDT) Sender: Richard Henderson Message-ID: <5075DCD6.5040601@twiddle.net> Date: Wed, 10 Oct 2012 13:38:46 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1349814458-21739-1-git-send-email-aurelien@aurel32.net> <1349814458-21739-12-git-send-email-aurelien@aurel32.net> In-Reply-To: <1349814458-21739-12-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/14] target-mips: optimize ddiv/ddivu/div/divu with movcond List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org On 10/09/2012 01:27 PM, Aurelien Jarno wrote: > + tcg_gen_setcondi_tl(TCG_COND_EQ, t2, t0, INT_MIN); > + tcg_gen_setcondi_tl(TCG_COND_EQ, t3, t1, -1); > + tcg_gen_and_tl(t2, t2, t3); > + tcg_gen_setcondi_tl(TCG_COND_EQ, t3, t1, 0); > + tcg_gen_or_tl(t2, t2, t3); > + tcg_gen_movi_tl(t3, 1); > + tcg_gen_movcond_tl(TCG_COND_NE, t1, t2, t4, t3, t1); You don't need t3. tcg_gen_movcond_tl(TCG_COND_NE, t1, t2, t4, t2, t1); I.e. if true, t2 already contains 1. That said, the patch isn't incorrect. Reviewed-by: Richard Henderson r~