Fix unreachable code in flowgraph
authorjashoo <jashoo@microsoft.com>
Wed, 10 Aug 2016 16:19:53 +0000 (09:19 -0700)
committerjashoo <jashoo@microsoft.com>
Wed, 10 Aug 2016 16:22:11 +0000 (09:22 -0700)
There is debugging information that is expected to be printed; however,
unreachable because the function returns before printing under debug.

Fixed by moved the return past the debug log.

src/jit/flowgraph.cpp

index 834cfd7..0e29f18 100644 (file)
@@ -13789,7 +13789,6 @@ bool Compiler::fgOptimizeBranchToNext(BasicBlock* block, BasicBlock* bNext, Basi
                     /* the unconditional jump is to the next BB  */
                     block->bbJumpKind = BBJ_NONE;
                     block->bbFlags &= ~BBF_NEEDS_GCPOLL;
-                    return true;
 #ifdef DEBUG
                     if  (verbose)
                     {
@@ -13797,6 +13796,7 @@ bool Compiler::fgOptimizeBranchToNext(BasicBlock* block, BasicBlock* bNext, Basi
                                block->bbNum, bNext->bbNum, block->bbNum);
                     }
 #endif // DEBUG
+                    return true;
                 }
             }
         }