-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Labels
Description
We met a testcase with a widenable branch in the form of br(c0 && (c1 && WC)):
%wc = call i1 @llvm.experimental.widenable.condition()
%and0 = and i1 %wc, %cond0
%and1 = and i1 %and0, %cond1
br i1 %and1, label %loop, label %deopt
That form is going to be supported after we finish GuardWidening reworking from branch widening to widenable conditions widening. But for now we still need to check that widenable branch is in the form of:
br(widenable_condition & (...))
That's why the one of the changes in the d6e7c16 was introduced too early:
bool llvm::isWidenableBranch(const User *U) {
- Value *Condition, *WidenableCondition;
- BasicBlock *GuardedBB, *DeoptBB;
- return parseWidenableBranch(U, Condition, WidenableCondition, GuardedBB,
- DeoptBB);
+ return extractWidenableCondition(U) != nullptr;
}
We need to revert that change to state that branch above isn't widenable.