Don't fuse colocated array offsets without -Ofuse.

This commit is contained in:
Mike Pall 2011-10-19 00:17:19 +02:00
parent f50075a9d7
commit 2fcd562582
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ static int32_t asm_fuseabase(ASMState *as, IRRef ref)
{ {
IRIns *ir = IR(ref); IRIns *ir = IR(ref);
if (ir->o == IR_TNEW && ir->op1 <= LJ_MAX_COLOSIZE && if (ir->o == IR_TNEW && ir->op1 <= LJ_MAX_COLOSIZE &&
noconflict(as, ref, IR_NEWREF)) !neverfuse(as) && noconflict(as, ref, IR_NEWREF))
return (int32_t)sizeof(GCtab); return (int32_t)sizeof(GCtab);
return 0; return 0;
} }

View File

@ -118,7 +118,7 @@ static IRRef asm_fuseabase(ASMState *as, IRRef ref)
lua_assert(irb->op2 == IRFL_TAB_ARRAY); lua_assert(irb->op2 == IRFL_TAB_ARRAY);
/* We can avoid the FLOAD of t->array for colocated arrays. */ /* We can avoid the FLOAD of t->array for colocated arrays. */
if (ira->o == IR_TNEW && ira->op1 <= LJ_MAX_COLOSIZE && if (ira->o == IR_TNEW && ira->op1 <= LJ_MAX_COLOSIZE &&
noconflict(as, irb->op1, IR_NEWREF, 1)) { !neverfuse(as) && noconflict(as, irb->op1, IR_NEWREF, 1)) {
as->mrm.ofs = (int32_t)sizeof(GCtab); /* Ofs to colocated array. */ as->mrm.ofs = (int32_t)sizeof(GCtab); /* Ofs to colocated array. */
return irb->op1; /* Table obj. */ return irb->op1; /* Table obj. */
} }