Skip to content

Commit

Permalink
Merge pull request #55 from lukego/slow-lea
Browse files Browse the repository at this point in the history
md5 benchmark 15% speedup by removing "slow LEA"
  • Loading branch information
lukego committed Mar 22, 2017
2 parents d54947d + 7356708 commit 742104f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/lj_asm_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -1710,20 +1710,6 @@ static int asm_lea(ASMState *as, IRIns *ir)
} else {
return 0;
}
} else if (ir->op1 != ir->op2 && irl->o == IR_ADD && mayfuse(as, ir->op1) &&
(irref_isk(ir->op2) || irref_isk(irl->op2))) {
Reg idx, base = ra_alloc1(as, irl->op1, allow);
rset_clear(allow, base);
as->mrm.base = (uint8_t)base;
if (irref_isk(ir->op2)) {
as->mrm.ofs = irr->i;
idx = ra_alloc1(as, irl->op2, allow);
} else {
as->mrm.ofs = IR(irl->op2)->i;
idx = ra_alloc1(as, ir->op2, allow);
}
rset_clear(allow, idx);
as->mrm.idx = (uint8_t)idx;
} else {
return 0;
}
Expand Down

0 comments on commit 742104f

Please sign in to comment.