diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 18ab2184568..b12634ae281 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -64,7 +64,8 @@ bool LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM, 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));