Received: from eggs.gnu.org ([2001:4830:134:3::10]:57474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YX7s8-00039v-UE for qemu-devel@nongnu.org; Sun, 15 Mar 2015 08:42:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YX7s5-00078q-Pc for qemu-devel@nongnu.org; Sun, 15 Mar 2015 08:42:24 -0400 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:51215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YX7s5-00077b-Jb for qemu-devel@nongnu.org; Sun, 15 Mar 2015 08:42:21 -0400 Message-ID: <55057E19.8010202@ilande.co.uk> Date: Sun, 15 Mar 2015 12:42:01 +0000 From: Mark Cave-Ayland MIME-Version: 1.0 References: <1426274817-25763-1-git-send-email-rth@twiddle.net> In-Reply-To: <1426274817-25763-1-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tcg/optimize: Handle or r, a, a with constant a List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-devel@nongnu.org On 13/03/15 19:26, Richard Henderson wrote: > As seen with ubuntu-5.10-live-powerpc.iso. > > Reported-by: Mark Cave-Ayland > Signed-off-by: Richard Henderson > --- > tcg/optimize.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tcg/optimize.c b/tcg/optimize.c > index 067917c..37c1110 100644 > --- a/tcg/optimize.c > +++ b/tcg/optimize.c > @@ -980,8 +980,11 @@ static void tcg_constant_folding(TCGContext *s) > if (temps_are_copies(args[1], args[2])) { > if (temps_are_copies(args[0], args[1])) { > tcg_op_remove(s, op); > - } else { > + } else if (temps[args[1]].state != TCG_TEMP_CONST) { > tcg_opt_gen_mov(s, op, args, opc, args[0], args[1]); > + } else { > + tcg_opt_gen_movi(s, op, args, opc, > + args[0], temps[args[1]].val); > } > continue; > } > Great work! Fixes the issue here for me so: Tested-by: Mark Cave-Ayland ATB, Mark.