From: Mike Pall Date: Mon, 9 Jul 2012 14:22:08 +0000 (+0200) Subject: Don't allocate constants for sunk stores. X-Git-Tag: v2.0.0-beta11~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79ecb231ce8079e8801f15307cf485efe7ee1255;p=thirdparty%2FLuaJIT.git Don't allocate constants for sunk stores. --- diff --git a/src/lj_asm.c b/src/lj_asm.c index 6ea5bc93..ce2a70d7 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c @@ -799,7 +799,7 @@ static int asm_sunk_store(ASMState *as, IRIns *ira, IRIns *irs) static void asm_snap_alloc1(ASMState *as, IRRef ref) { IRIns *ir = IR(ref); - if (!(ra_used(ir) || ir->r == RID_SUNK)) { + if (!irref_isk(ref) && (!(ra_used(ir) || ir->r == RID_SUNK))) { if (ir->r == RID_SINK) { ir->r = RID_SUNK; #if LJ_HASFFI