]> git.gag.com Git - fw/sdcc/commitdiff
A better but still temporary fix for bug #467035
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 12 Oct 2001 09:45:32 +0000 (09:45 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 12 Oct 2001 09:45:32 +0000 (09:45 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1390 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCcse.c
src/SDCCloop.c

index 34ab12cde515cd8b4b6676ee46f424234ad6ce1d..e98b3724522cc7253bd646930e214ab45a1172f1 100644 (file)
@@ -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);
index 7384fa1364f1c94535369d8b0094bc5d1ec4afee..7ab87a7ff8277d62140a6b17be62365b2b250715 100644 (file)
@@ -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));