Don't do dead block elimination in fast mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31155 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index 18ab218..b12634a 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -64,7 +64,8 @@
PM.add(createPrologEpilogCodeInserter());
// Branch folding must be run after regalloc and prolog/epilog insertion.
- PM.add(createBranchFoldingPass());
+ if (!Fast)
+ PM.add(createBranchFoldingPass());
if (PrintMachineCode) // Print the register-allocated code
PM.add(createMachineFunctionPrinterPass(&std::cerr));