fixed a loop optimation bug
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 10 Oct 2001 12:25:04 +0000 (12:25 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 10 Oct 2001 12:25:04 +0000 (12:25 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1385 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCloop.c

index 87523a21978a29a4c3b6e241cc0fe3dfe4b9a9d6..7384fa1364f1c94535369d8b0094bc5d1ec4afee 100644 (file)
@@ -231,7 +231,8 @@ DEFSETFUNC (addToExitsMarkDepth)
   V_ARG (region *, lr);
 
   /* mark the loop depth of this block */
-  if (!ebp->depth)
+  //if (!ebp->depth)
+  if (ebp->depth<depth)
     ebp->depth = depth;
 
   /* put the loop region info in the block */
@@ -803,7 +804,7 @@ basicInduction (region * loopReg, eBBlock ** ebbs, int count)
                     "this will keep the regressions tests going.\n",
                     __FILE__, __LINE__);
            continue;
-         } continue;
+         }
 
          /* replace the inducted variable by the iTemp */
          replaceSymBySym (loopReg->regBlocks, IC_RESULT (ic), IC_RIGHT (ic));