cleanup the cfg after lsr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20410 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 4bc5c50..dd40e13 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -75,8 +75,10 @@
                                                    std::ostream &Out) {
   bool LP64 = (0 != dynamic_cast<PPC64TargetMachine *>(this));
 
-  if (EnablePPCLSR)
+  if (EnablePPCLSR) {
     PM.add(createLoopStrengthReducePass());
+    PM.add(createCFGSimplificationPass());
+  }
   
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
@@ -120,8 +122,10 @@
 }
 
 void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
-  if (EnablePPCLSR)
+  if (EnablePPCLSR) {
     PM.add(createLoopStrengthReducePass());
+    PM.add(createCFGSimplificationPass());
+  }
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());