From d5098fe70fab56b5f120bdf508b5ac9d114e454a Mon Sep 17 00:00:00 2001 From: bal Date: Mon, 25 Feb 1985 14:03:09 +0000 Subject: [PATCH] Bug fixed: co_lfirst received wrong value for multiply-optimization. --- util/ego/sr/sr_reduce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/ego/sr/sr_reduce.c b/util/ego/sr/sr_reduce.c index 35aec7654..db9543d70 100644 --- a/util/ego/sr/sr_reduce.c +++ b/util/ego/sr/sr_reduce.c @@ -487,6 +487,7 @@ STATIC try_multiply(lp,ivs,vars,b,mul) c = newcinfo(); c->c_o.co_loadlc = PREV(l2); c->co_endexpr = l2; + c->co_lfirst = PREV(lbegin); } else { if (is_const(l2) && (is_ivexpr(PREV(l2),ivs,vars,&lbegin,&iv,&sign))) { @@ -494,6 +495,7 @@ STATIC try_multiply(lp,ivs,vars,b,mul) c = newcinfo(); c->c_o.co_loadlc = l2; c->co_endexpr = PREV(l2); + c->co_lfirst = lbegin; } else { OUTTRACE("failed",0); return; @@ -503,7 +505,6 @@ STATIC try_multiply(lp,ivs,vars,b,mul) c->co_iv = iv; c->co_loop = lp; c->co_block = b; - c->co_lfirst = PREV(l2); c->co_llast = mul; c->co_ivexpr = lbegin; c->co_sign = sign; -- 2.34.1