Return whether a compare is implied true or false by LHS, if known.
Declared in <llvm/Analysis/ValueTracking.h>
std::optional<bool>
isImpliedCondition(
Value const* LHS,
CmpPredicate RHSPred,
Value const* RHSOp0,
Value const* RHSOp1,
DataLayout const& DL,
bool LHSIsTrue = true,
unsigned int Depth = 0);
True/false if implied, or nullopt if unknown.
| Name | Description |
|---|---|
| LHS | Condition assumed true or false according to LHSIsTrue. |
| RHSPred | Predicate of the right-hand compare. |
| RHSOp0 | Left operand of the right-hand compare. |
| RHSOp1 | Right operand of the right-hand compare. |
| DL | Data layout used by the implication analysis. |
| LHSIsTrue | Whether LHS is assumed true (vs false). |
| Depth | Current recursion depth for this query. |