llvm::OverflowResult

Result of analyzing whether an arithmetic operation can overflow.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

enum class OverflowResult : int;

Members

NameDescription
AlwaysOverflowsLow Always overflows in the direction of signed/unsigned min value.
AlwaysOverflowsHigh Always overflows in the direction of signed/unsigned max value.
MayOverflow May or may not overflow.
NeverOverflows Never overflows.

Non-Member Functions

NameDescription
computeOverflowForSignedAddThis version also leverages the sign bit of Add if known.
computeOverflowForSignedAddCompute whether a signed add of LHS and RHS can overflow.
computeOverflowForSignedMulCompute whether a signed multiply of LHS and RHS can overflow.
computeOverflowForSignedSubCompute whether a signed subtract of LHS and RHS can overflow.
computeOverflowForUnsignedAddCompute whether an unsigned add of LHS and RHS can overflow.
computeOverflowForUnsignedMulCompute whether an unsigned multiply of LHS and RHS can overflow.
computeOverflowForUnsignedSubCompute whether an unsigned subtract of LHS and RHS can overflow.