llvm::isImpliedByDomCondition

Return whether a compare is known from dominating conditions at ContextI.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

std::optional<bool>
isImpliedByDomCondition(
    CmpPredicate Pred,
    Value const* LHS,
    Value const* RHS,
    Instruction const* ContextI,
    DataLayout const& DL);

Return Value

Known boolean value of the compare, or nullopt if unknown.

Parameters

NameDescription
PredPredicate of the compare to evaluate.
LHSLeft-hand operand of the compare.
RHSRight-hand operand of the compare.
ContextIInstruction providing the dominating-condition context.
DLData layout used by the implication analysis.