llvm::simplifyAddInst

Given operands for an Add, fold the result or return null.

Synopsis

Declared in <llvm/Analysis/InstructionSimplify.h>

Value*
simplifyAddInst(
    Value* LHS,
    Value* RHS,
    bool IsNSW,
    bool IsNUW,
    SimplifyQuery const& Q);

Return Value

The folded value, or null if no simplification was found.

Parameters

NameDescription
LHSLeft-hand side operand.
RHSRight-hand side operand.
IsNSWWhether the add has the nsw flag.
IsNUWWhether the add has the nuw flag.
QSimplification query providing analyses and flags.