mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
74caac97ae
@ -247,12 +247,18 @@ static void narrow_stripov_backprop(NarrowConv *nc, IRRef ref, int depth)
|
||||
if (bp) {
|
||||
ref = bp->val;
|
||||
} else if (++depth < NARROW_MAX_BACKPROP && nc->sp < nc->maxsp) {
|
||||
NarrowIns *savesp = nc->sp;
|
||||
narrow_stripov_backprop(nc, ir->op1, depth);
|
||||
if (nc->sp < nc->maxsp) {
|
||||
narrow_stripov_backprop(nc, ir->op2, depth);
|
||||
if (nc->sp < nc->maxsp) {
|
||||
*nc->sp++ = NARROWINS(IRT(ir->o - IR_ADDOV + IR_ADD, IRT_INT), ref);
|
||||
return;
|
||||
}
|
||||
}
|
||||
nc->sp = savesp; /* Path too deep, need to backtrack. */
|
||||
}
|
||||
}
|
||||
*nc->sp++ = NARROWINS(NARROW_REF, ref);
|
||||
}
|
||||
|
||||
@ -263,6 +269,8 @@ static int narrow_conv_backprop(NarrowConv *nc, IRRef ref, int depth)
|
||||
IRIns *ir = IR(ref);
|
||||
IRRef cref;
|
||||
|
||||
if (nc->sp >= nc->maxsp) return 10; /* Path too deep. */
|
||||
|
||||
/* Check the easy cases first. */
|
||||
if (ir->o == IR_CONV && (ir->op2 & IRCONV_SRCMASK) == IRT_INT) {
|
||||
if ((nc->mode & IRCONV_CONVMASK) <= IRCONV_ANY)
|
||||
|
Loading…
Reference in New Issue
Block a user