llvm::isImpliedCondition

isImpliedCondition overloads

Synopses

Declared in <llvm/Analysis/ValueTracking.h>

Return whether RHS is implied true or false by LHS, if known.

std::optional<bool>
isImpliedCondition(
    Value const* LHS,
    Value const* RHS,
    DataLayout const& DL,
    bool LHSIsTrue = true,
    unsigned int Depth = 0);
» more...

Return whether a compare is implied true or false by LHS, if known.

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);
» more...

Return Value

True/false if implied, or nullopt if unknown.

Parameters

NameDescription
LHSCondition assumed true or false according to LHSIsTrue.
RHSCondition whose implication from LHS is tested.
DLData layout used by the implication analysis.
LHSIsTrueWhether LHS is assumed true (vs false).
DepthCurrent recursion depth for this query.
RHSPredPredicate of the right-hand compare.
RHSOp0Left operand of the right-hand compare.
RHSOp1Right operand of the right-hand compare.