Fold a compare if it can be simplified.

Synopsis

Declared in <llvm/IR/IRBuilderFolder.h>

virtual
Value*
FoldCmp(
    CmpInst::Predicate P,
    Value* LHS,
    Value* RHS) const = 0;

Return Value

The folded value, or nullptr if the operation cannot be simplified.

Parameters

Name

Description

P

The compare predicate.

LHS

Left‐hand operand.

RHS

Right‐hand operand.

Created with MrDocs