Bug fixed: co_lfirst received wrong value for multiply-optimization.

This commit is contained in:
bal 1985-02-25 14:03:09 +00:00
parent 469d075e77
commit d5098fe70f

View file

@ -487,6 +487,7 @@ STATIC try_multiply(lp,ivs,vars,b,mul)
c = newcinfo(); c = newcinfo();
c->c_o.co_loadlc = PREV(l2); c->c_o.co_loadlc = PREV(l2);
c->co_endexpr = l2; c->co_endexpr = l2;
c->co_lfirst = PREV(lbegin);
} else { } else {
if (is_const(l2) && if (is_const(l2) &&
(is_ivexpr(PREV(l2),ivs,vars,&lbegin,&iv,&sign))) { (is_ivexpr(PREV(l2),ivs,vars,&lbegin,&iv,&sign))) {
@ -494,6 +495,7 @@ STATIC try_multiply(lp,ivs,vars,b,mul)
c = newcinfo(); c = newcinfo();
c->c_o.co_loadlc = l2; c->c_o.co_loadlc = l2;
c->co_endexpr = PREV(l2); c->co_endexpr = PREV(l2);
c->co_lfirst = lbegin;
} else { } else {
OUTTRACE("failed",0); OUTTRACE("failed",0);
return; return;
@ -503,7 +505,6 @@ STATIC try_multiply(lp,ivs,vars,b,mul)
c->co_iv = iv; c->co_iv = iv;
c->co_loop = lp; c->co_loop = lp;
c->co_block = b; c->co_block = b;
c->co_lfirst = PREV(l2);
c->co_llast = mul; c->co_llast = mul;
c->co_ivexpr = lbegin; c->co_ivexpr = lbegin;
c->co_sign = sign; c->co_sign = sign;