Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 16b79d0

Browse files
authored
Merge pull request #49 from eddyb/fix-pointer-range-loops
Run GVN again after InstCombine.
2 parents 510d622 + cc2009f commit 16b79d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Transforms/IPO/PassManagerBuilder.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
317317
// Run instcombine after redundancy elimination to exploit opportunities
318318
// opened up by them.
319319
addInstructionCombiningPass(MPM);
320+
if (OptLevel > 1)
321+
MPM.add(createGVNPass(DisableGVNLoadPRE)); // Remove redundancies
320322
addExtensionsToPM(EP_Peephole, MPM);
321323
MPM.add(createJumpThreadingPass()); // Thread jumps
322324
MPM.add(createCorrelatedValuePropagationPass());

0 commit comments

Comments
 (0)