From: Mike Pall Date: Tue, 19 Jan 2010 00:45:39 +0000 (+0100) Subject: Fix broken intarith + testop optimization. X-Git-Tag: v2.0.0-beta3~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36769c2f6b78e0802cc7cd86f6da301cd7a171fe;p=thirdparty%2FLuaJIT.git Fix broken intarith + testop optimization. --- diff --git a/src/lj_asm.c b/src/lj_asm.c index 20d26278..6d42cf35 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c @@ -2423,9 +2423,9 @@ static void asm_comp_(ASMState *as, IRIns *ir, int cc) asm_guardcc(as, cc); if (usetest && left != RID_MRM) { /* Use test r,r instead of cmp r,0. */ + emit_rr(as, XO_TEST, left, left); if (irl+1 == ir) /* Referencing previous ins? */ as->testmcp = as->mcp; /* Set flag to drop test r,r if possible. */ - emit_rr(as, XO_TEST, left, left); } else { x86Op xo; if (checki8(imm)) {