llvm::computeOverflowForUnsignedAdd

Compute whether an unsigned add of LHS and RHS can overflow.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

OverflowResult
computeOverflowForUnsignedAdd(
    WithCache<Value const*> const& LHS,
    WithCache<Value const*> const& RHS,
    SimplifyQuery const& SQ);

Return Value

Overflow classification for the unsigned add.

Parameters

NameDescription
LHSLeft-hand operand of the add.
RHSRight-hand operand of the add.
SQSimplify query providing context for the analysis.