diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp index ff9ba91d4ea..7e0823edf1b 100644 --- a/tools/lto/lto.cpp +++ b/tools/lto/lto.cpp @@ -330,8 +330,7 @@ LTO::optimize(Module *M, std::ostream &Out, Passes.add(createGlobalsModRefPass()); // IP alias analysis Passes.add(createLICMPass()); // Hoist loop invariants - Passes.add(createLoadValueNumberingPass()); // GVN for load instrs - Passes.add(createGCSEPass()); // Remove common subexprs + Passes.add(createGVNPass()); // Remove common subexprs Passes.add(createDeadStoreEliminationPass()); // Nuke dead stores // Cleanup and simplify the code after the scalar optimizations. diff --git a/tools/lto2/LTOCodeGenerator.cpp b/tools/lto2/LTOCodeGenerator.cpp index b7962be50be..db27145bbf9 100644 --- a/tools/lto2/LTOCodeGenerator.cpp +++ b/tools/lto2/LTOCodeGenerator.cpp @@ -377,8 +377,7 @@ bool LTOCodeGenerator::generateAssemblyCode(std::ostream& out, std::string& errM passes.add(createGlobalsModRefPass()); // IP alias analysis passes.add(createLICMPass()); // Hoist loop invariants - passes.add(createLoadValueNumberingPass()); // GVN for load instrs - passes.add(createGCSEPass()); // Remove common subexprs + passes.add(createGVNPass()); // Remove common subexprs passes.add(createDeadStoreEliminationPass()); // Nuke dead stores // Cleanup and simplify the code after the scalar optimizations.