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 1e34cb0 commit 365f5e2Copy full SHA for 365f5e2
llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -2874,11 +2874,14 @@ bool JumpThreadingPass::tryToUnfoldSelectInCurrBB(BasicBlock *BB) {
2874
continue;
2875
2876
auto isUnfoldCandidate = [BB](SelectInst *SI, Value *V) {
2877
+ using namespace PatternMatch;
2878
+
2879
// Check if SI is in BB and use V as condition.
2880
if (SI->getParent() != BB)
2881
return false;
2882
Value *Cond = SI->getCondition();
- return (Cond && Cond == V && Cond->getType()->isIntegerTy(1));
2883
+ bool IsAndOr = match(SI, m_CombineOr(m_LogicalAnd(), m_LogicalOr()));
2884
+ return Cond && Cond == V && Cond->getType()->isIntegerTy(1) && !IsAndOr;
2885
};
2886
2887
SelectInst *SI = nullptr;
0 commit comments