Skip to content

Commit 1a6cebb

Browse files
committed
[PM] Fix new PM to perform SpeculativeExecution as in old PM
Summary: Old PM runs SpeculativeExecutionPass for targets that have divergent branches. It uses `createSpeculativeExecutionIfHasBranchDivergencePass` that creates the pass with `OnlyIfDivergentTarget=true`, whereas new PM just created the pass with default `OnlyIfDivergentTarget=fase` so it unexpectedly runs and causes buildbot test fails. Reviewers: chandlerc, arsenm Reviewed By: arsenm Subscribers: wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82735
1 parent bc163f6 commit 1a6cebb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level,
584584
}
585585

586586
// Speculative execution if the target has divergent branches; otherwise nop.
587-
FPM.addPass(SpeculativeExecutionPass());
587+
FPM.addPass(SpeculativeExecutionPass(/* OnlyIfDivergentTarget =*/true));
588588

589589
// Optimize based on known information about branches, and cleanup afterward.
590590
FPM.addPass(JumpThreadingPass());

0 commit comments

Comments
 (0)