We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7c0538 commit 0db560fCopy full SHA for 0db560f
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -3753,6 +3753,8 @@ Instruction *InstCombinerImpl::visitBranchInst(BranchInst &BI) {
3753
}
3754
3755
// Replace all dominated uses of the condition with true/false
3756
+ // Ignore constant expressions to avoid iterating over uses on other
3757
+ // functions.
3758
if (!isa<Constant>(Cond) && BI.getSuccessor(0) != BI.getSuccessor(1)) {
3759
for (auto &U : make_early_inc_range(Cond->uses())) {
3760
BasicBlockEdge Edge0(BI.getParent(), BI.getSuccessor(0));
0 commit comments