From: johanknol Date: Fri, 12 Oct 2001 09:45:32 +0000 (+0000) Subject: A better but still temporary fix for bug #467035 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=9a33d11ed4da527058a0407d9ae493865430f316;p=fw%2Fsdcc A better but still temporary fix for bug #467035 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1390 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCcse.c b/src/SDCCcse.c index 34ab12cd..e98b3724 100644 --- a/src/SDCCcse.c +++ b/src/SDCCcse.c @@ -1520,9 +1520,13 @@ cseBBlock (eBBlock * ebb, int computeOnly, /* of this with previous opcode */ if (pdic) { - if (IS_ITEMP (IC_RESULT (ic))) { + + if (pdic->level > ic->level) { + // pdic was inside an inner loop + continue; + } /* replace in the remaining of this block */ replaceAllSymBySym (ic->next, IC_RESULT (ic), IC_RESULT (pdic), &ebb->ndompset); diff --git a/src/SDCCloop.c b/src/SDCCloop.c index 7384fa13..7ab87a7f 100644 --- a/src/SDCCloop.c +++ b/src/SDCCloop.c @@ -799,13 +799,6 @@ basicInduction (region * loopReg, eBBlock ** ebbs, int count) OP_SYMBOL (IC_RESULT (indIc))->isind = 1; ip = newInduction (IC_RIGHT (ic), dic->op, litValue, indIc, NULL); - if (0) { - fprintf (stderr, "%s:%d: stupid way to avoid bug #467035, but\n" - "this will keep the regressions tests going.\n", - __FILE__, __LINE__); - continue; - } - /* replace the inducted variable by the iTemp */ replaceSymBySym (loopReg->regBlocks, IC_RESULT (ic), IC_RIGHT (ic));