mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Fix ABC FOLD rule with constants.
Reported by XmiliaH.
This commit is contained in:
parent
e73916d811
commit
c8bcf1e5fb
@ -1682,14 +1682,15 @@ LJFOLDF(abc_fwd)
|
||||
LJFOLD(ABC any KINT)
|
||||
LJFOLDF(abc_k)
|
||||
{
|
||||
PHIBARRIER(fleft);
|
||||
if (LJ_LIKELY(J->flags & JIT_F_OPT_ABC)) {
|
||||
IRRef ref = J->chain[IR_ABC];
|
||||
IRRef asize = fins->op1;
|
||||
while (ref > asize) {
|
||||
IRIns *ir = IR(ref);
|
||||
if (ir->op1 == asize && irref_isk(ir->op2)) {
|
||||
int32_t k = IR(ir->op2)->i;
|
||||
if (fright->i > k)
|
||||
uint32_t k = (uint32_t)IR(ir->op2)->i;
|
||||
if ((uint32_t)fright->i > k)
|
||||
ir->op2 = fins->op2;
|
||||
return DROPFOLD;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user