Fix CodePlacementOpt::OptimizeIntraLoopEdges so that its return value
correctly indicates whether it changed the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72038 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodePlacementOpt.cpp b/lib/CodeGen/CodePlacementOpt.cpp
index 919ee54..383098e 100644
--- a/lib/CodeGen/CodePlacementOpt.cpp
+++ b/lib/CodeGen/CodePlacementOpt.cpp
@@ -134,6 +134,7 @@
TII->RemoveBranch(*MBB);
ChangedMBBs.insert(MBB);
++NumIntraElim;
+ Changed = true;
continue;
}
@@ -231,6 +232,7 @@
TII->InsertBranch(*FtMBB, FtTBB, FtFBB, FtCond);
ChangedMBBs.insert(FtMBB);
}
+ Changed = true;
// If BB is the loop latch, we may have a new loop headr.
if (MBB == L->getLoopLatch()) {