llvm::InstCombiner::computeOverflowForSignedAdd

Compute whether a signed add of LHS and RHS can overflow.

Synopsis

Declared in <llvm/Transforms/InstCombine/InstCombiner.h>

OverflowResult
computeOverflowForSignedAdd(
    WithCache<Value const*> const& LHS,
    WithCache<Value const*> const& RHS,
    Instruction const* CxtI) const;

Return Value

Whether the signed add can overflow.

Parameters

NameDescription
LHSLeft-hand operand of the add.
RHSRight-hand operand of the add.
CxtIOptional context instruction for local analysis.