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

Name

Description

LHS

Left‐hand side operand.

RHS

Right‐hand side operand.

IsNSW

Whether the add has the nsw flag.

IsNUW

Whether the add has the nuw flag.

Q

Simplification query providing analyses and flags.

Created with MrDocs