Parses a widenable branch and returns its condition, widenable condition, and successor blocks.
Declared in <llvm/Analysis/GuardUtils.h>
bool
parseWidenableBranch(
User const* U,
Value*& Condition,
Value*& WidenableCondition,
BasicBlock*& IfTrueBB,
BasicBlock*& IfFalseBB);
If U is widenable branch looking like: %cond = ... %wc = call i1 llvm.experimental.widenable.condition() %branch_cond = and i1 %cond, %wc br i1 %branch_cond, label %if_true_bb, label %if_false_bb ; <--- U The function returns true, and the values %cond and %wc and blocks %if_true_bb, if_false_bb are returned in the parameters (Condition, WidenableCondition, IfTrueBB and IfFalseBB) respectively. If U does not match this pattern, return false.
True if U matches the widenable branch pattern.
| Name | Description |
|---|---|
| U | User expected to be the widenable branch. |
| Condition | Set to the non-widenable part of the branch condition. |
| WidenableCondition | Set to the widenable.condition call result. |
| IfTrueBB | Set to the true successor of the branch. |
| IfFalseBB | Set to the false successor of the branch. |